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

猜你喜欢

转载自www.cnblogs.com/zuann301/p/9181568.html