How To Install Nginx on CentOS 7 (Nginx 安装)

1 Add Nginx Repository

sudo yum install epel-release

2 Install Nginx

sudo yum install nginx

3 Start Nginx

sudo systemctl start nginx

4 firewall settings

sudo firewall-cmd --permanent --zone=public --add-service=http

sudo firewall-cmd --permanent --zone=public --add-service=https

sudo firewall-cmd --reload

5 start Nginx when your system boots

sudo systemctl enable nginx

 

posted @ 2018-06-14 09:41  蔡员外  阅读(123)  评论(0编辑  收藏  举报