Nginx学习环境准备
学习环境准备
1、学习环境
系统硬件:CPU > 2Core,内存>256M
自己服务器 or 阿里云服务器 or 虚拟服务器 or Docker
操作系统:版本>=7.0,位数X64
or
2、环境调试确认
四项确认:
(1)确认系统网络
(2)确认yum可用
(3)确认关闭iptables规则
查看是否存在iptables规则:
iptables -L
我这里是没有iptables规则,如果有iptables规则可以关闭
iptables -F
然后查看nat表里面是否有规则,有的话也要关闭
iptables -t nat -L
这里是没有nat规则,如果有的话可以关闭
iptables -t nat -F
(4)确认停用selinux(屏蔽一些安全性规则)
查看selinux是否开启
getenforce
这里是关闭的,如果不是关闭的可以使用如下命令关闭
setenforce 0
两项安装:
yum -y install gcc gcc-c++ autoconf pcre pcre-devel make automake
yum -y install wget httpd-tools vim
一次初始化:
cd /opt;
mkdir app download logs work backup