1.yum install gcc gcc-c++ (gcc -v)
2.yum -y install gcc zlib zlib-devel pcre pcre-devel openssl openssl-devel
3.wget http://nginx.org/download/nginx-1.12.1.tar.gz
4.tar -zxvf configure
5.whereis nginx
6 make make install
7.测试配置文件 nginx -t ps aux| grep nginx
8重启 nginx -s reload
9查看进程命令 ps -ef| grep nginx
10.平滑重启 kill -HUP + pid
11. 增加防火墙访问权限
sudo vim /etc/sysconfig/iptales
-A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
sudo service iptables restart
网友评论