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地址
建议阅读
- screen 命令详解(查看: 938)
- Windows系统Hang(停止响应)的处理(查看: 12573)
- Nginx屏蔽蜘蛛(查看: 1205)
- Windows系统异常重启以及蓝屏的处理(查看: 10387)
- Ubuntu18.04 永久修改DNS的方法(查看: 14470)