CentOS7 安装Nginx
1、添加仓库
sudo yum install epel-release
2、安装nginx
sudo yum install nginx
3、启动nginx
sudo systemctl start nginx
4、如果系统开启了防火墙,执行下面命令允许http/https
sudo firewall-cmd --permanent --zone=public --add-service=http
sudo firewall-cmd --permanent --zone=public --add-service=https
sudo firewall-cmd --reload
至此CentOS7 安装 Nginx 的工作就完成了。