CentOS6.7上面安装nignx
1.添加nginx的yum仓库
创建文件名为/etc/yum.repos.d/nginx.repo并拷贝粘贴以下配置内容:
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=0
enabled=1
创建文件名为/etc/yum.repos.d/nginx.repo并拷贝粘贴以下配置内容:
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=0
enabled=1
yum makecache
命令yum install nginx
nginx -c /etc/nginx/nginx.conf
以后在使用service nginx start
命令直接成功相关推荐