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
posted @ 2022-04-24 10:40  tangshow  阅读(135)  评论(0编辑  收藏  举报