Centos7 安装Nginx的步骤
1.添加Nginx源:
sudo rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
2.安装Nginx
yum install -y nginx
3.启动Nginx并设置开机自启
sudo systemctl start nginx.service
sudo systemctl enable nginx.service
4.关闭防火墙
systemctl stop firewalld.service
5.验证结果
在浏览器中输入您的服务器IP地址:http://IP地址
建议阅读
- centos7破解root密码(查看: 7930)
- Nginx屏蔽蜘蛛(查看: 1442)
- 输出主IP(查看: 945)
- Windows开启内核转储(Core Dump)配置说明(查看: 18312)
- 宝塔面板查看默认入口和账号密码的方法(查看: 44112)