赞
踩
安装组件
sudo yum install yum-utils
要设置yum存储库,请创建名为/etc/yum.repos.d/nginx.repo
的文件,填写内容如下:
[nginx-stable]
name=nginx stable repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=1
enabled=1
gpgkey=https://nginx.org/keys/nginx_signing.key
module_hotfixes=true
[nginx-mainline]
name=nginx mainline repo
baseurl=http://nginx.org/packages/mainline/centos/$releasever/$basearch/
gpgcheck=1
enabled=0
gpgkey=https://nginx.org/keys/nginx_signing.key
module_hotfixes=true
sudo yum-config-manager --enable nginx-mainline
sudo yum install nginx
/etc/nginx
service nginx start
service nginx stop
service nginx restart
ip
出现Nginx欢迎页面即可,他有默认配置的欢迎页面。Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。