准备工作(初始化)
1.关闭防火墙
systemctl disable firewalld --now //直接永久关闭防火墙
2.关闭SELINUX
查看SELINUX:getenforce
永久关闭:
[root@localhost ~]# vim /etc/selinux/config
SELINUX=enforcing|disabled
或者
[root@localhost ~]# sed -i 's/^SELINUX=.*/SELINUX=disabled/' /etc/selinux/config
3.修改主机名
root@localhost ~]#hostnamectl set-hostname lnmp
4.安装本地yum源
root@localhost ~]#curl -o tool.sh 10.35.156.250/repo/tools.sh
root@localhost ~]#sh tool.sh
5.重启服务器
root@localhost ~]#reboot
安装nginx
[root@lnmp ~]#yum -y install nginx
[root@lnmp ~]#nginx // 启动
[root@lnmp ~]#ss -nplt //查看</