主机环境:Red Hat Enterprise Linux Server release 6.2
具体步骤:
备份配置文件
cp /etc/nginx/nginx.conf /root/nginx.conf_bak20181211
配置yun源
cat <<EOF >/etc/yum.repos.d/nginx.repo
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/6/$basearch/
gpgcheck=0
enabled=1
EOF
查看yum源
cat /etc/yum.repos.d/nginx.repo
升级
yum update nginx --enablerepo='nginx'
查看nginx版本
nginx -v
查看配置文件
cat /etc/nginx/nginx.conf
重启
pkill nginx
service nginx start
查看nginx启动情况
ps -ef|grep nginx
Be First to Comment