CentOS6.5使用YUM命令方便快捷安装Nginx |
1.默认 yum 仓库无法直接安装nginx,需要创建一个文件 /etc/yum.repos.d/nginx.repo,并将下面的内容复制进去: 1. [nginx] 2. name=nginx repo 3. baseurl=http://nginx.org/packages/centos/$releasever/$basearch/ 4. gpgcheck=0 5. enabled=1 2.编辑并保存/etc/yum.repos.d/nginx.repo文件后,在命令行下执行: 1. [root@localhost ~]# yum list | grep nginx 2. nginx.x86_64 1.8.0-1.el6.ngx nginx 3. nginx-debug.x86_64 1.8.0-1.el6.ngx nginx 4. nginx-debuginfo.x86_64 1.8.0-1.el6.ngx nginx 5. nginx-nr-agent.noarch 2.0.0-8.el6.ngx nginx 安装:yum -y install nginx |