sudo setenforce Permissive
sudo vim /etc/selinux/config
SELINUX=permissive
sudo systemctl stop firewalld.service
sudo systemctl disable firewalld.service
sudo yum -y install yum-utils
sudo su -
echo -e '[nginx-stable]\nname=nginx stable repo\nbaseurl=http://nginx.org/packages/centos/$releasever/$basearch/\ngpgcheck=1\nenabled=1\ngpgkey=https://nginx.org/keys/nginx_signing.key\nmodule_hotfixes=true\n' > /etc/yum.repos.d/nginx.repo
exit
sudo yum -y install nginx
sudo systemctl enable nginx.service
sudo systemctl start nginx.service
标签:CentOS,service,nginx,部署,sudo,Nginx,systemctl,yum
From: https://www.cnblogs.com/f0rsaken/p/16814340.html