centos yum安装最新nginx
关闭selinux
做转发时 有可能nginx报权限错误,需关闭selinux
setenforce 0
sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config;cat /etc/selinux/config
添加yum源
rpm -ivh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
安装
yum install nginx
启动
systemctl enable nginx
systemctl start nginx