1.安装依赖包
yum -y install openssl openssl-devel
yum install pcre*
yum install openssl*
yum install zlib
yum install zlib-devel
yum install wget

2.下载,解压nginx包
cd /usr/local/software
wget http://nginx.org/download/nginx-1.8.0.tar.gz
tar -zxvf nginx-1.8.0.tar.gz

3.配置,编译nginx 到 /usr/local/nginx
cd nginx-1.8.0
./configure –prefix=/usr/local/nginx \–with-http_ssl_module –with-http_spdy_module \–with-http_stub_status_module –with-pcre
make && make install

4.平滑启动nginx 及 重启命令
cd /usr/local/nginx
./sbin/nginx
ps -ef|grep “nginx”
./sbin/nginx -s reload #平滑重启nginx

5.阿里云开放80端口 后打开网址(服务器公网ip)X.X.X.X 出现

 

版权声明:本文为buddyquan原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/buddyquan/p/8809101.html