- 安装NGINX
- 关闭防火墙
- 关闭selinux
- 配置conf文件
- 启动NGINX
#安装NGINX
这里使用的是Centos7系统,使用yum安装比较方便。
#添加nginx源后
yum -y install nginx
#关闭防火墙
systemctl stop firewalld
systemctl disable firewalld
#关闭selinux
#修改/etc/selinux/config 文件
#将SELINUX=enforcing改为SELINUX=disabled
#需要重启机器
setsebool -P httpd_can_network_connect 1
#临时关闭(不用重启机器)
setenforce 0
#配置conf文件
这个就根据自己需求配置就可以。注意ssl那些就行。
#启动NGINX
systemctl start nginx
Comments 1 条评论
手动操作不容易忘记,我用宝塔后都忘完了