Centos7 yum 安装Nginx

https://www.jiloc.com/42380.html

 

1.添加Nginx Repository

 yum install epel-release

2.安装Nginx

 yum install nginx

3.启动Nginx服务: 

systemctl start nginx

如果开着防火墙,请运行如下命令:

firewall-cmd --permanent --zone=public --add-service=http
firewall-cmd --permanent --zone=public --add-service=https
firewall-cmd --reload

4.访问IP地址:

 如果能看到此页面则说明nginx运作正常!

5.开机自动启动Nginx

systemctl enable nginx
posted @ 2016-12-15 09:27  Null98  阅读(201)  评论(1编辑  收藏  举报