首页 > 系统相关 >CentOS 7 环境下部署 Nginx 服务

CentOS 7 环境下部署 Nginx 服务

时间:2022-10-21 17:44:40浏览次数:48  
标签:CentOS service nginx 部署 sudo Nginx systemctl yum

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

相关文章