CentOS 7安装Nginx 1.10.2
安装epel-release源并进行安装
yum
install
epel-release
![](https://images2017.cnblogs.com/blog/1265953/201712/1265953-20171212095417618-843222606.png)
yum update(时间会有点长)
![](https://images2017.cnblogs.com/blog/1265953/201712/1265953-20171212095459790-1078964562.png)
yum
install
nginx
![](https://images2017.cnblogs.com/blog/1265953/201712/1265953-20171212101650915-1041424612.png)
相关操作:
systemctl status nginx
#查看运行状态
systemctl start nginx
#启动
systemctl stop nginx
#停止
systemctl restart nginx
#重启
systemctl
enable
nginx
#开机启动
![](https://images2017.cnblogs.com/blog/1265953/201712/1265953-20171212101931384-1113189658.png)
设置防火墙
在启动完以后可能无法通过IP访问,需要进一步设置防火墙
firewall-cmd --permanent --zone=public --add-service=http
firewall-cmd --permanent --zone=public --add-service=https
firewall-cmd --reload
人生是马、自律是缰。信马由缰,必将偏离轨道,甚至会有粉身碎骨的风险。
人生是舟、自律是水。以水推舟,方能自在杨帆,驶向自己人生价值的彼岸。