安装Nginx

cd /usr/local/src/
wget http://nginx.org/download/nginx-1.12.2.tar.gz
tar xf nginx-1.12.2.tar.gz
cd nginx-1.12.2
./configure --prefix=/usr/local/nginx --with-http_ssl_module
make && make install
vim /etc/init.d/nginx
# 参考:https://coding.net/u/aminglinux/p/aminglinux-book/git/blob/master/D15Z/etc_init.d_nginx
chmod 755 /etc/init.d/nginx
chkconfig --add nginx
chkconfig nginx on
cd /usr/local/nginx/conf/
mv nginx.conf nginx.conf.bak
vim nginx.conf
# 参考:https://coding.net/u/aminglinux/p/aminglinux-book/git/blob/master/D15Z/nginx.conf
/usr/local/nginx/sbin/nginx -t
/etc/init.d/nginx start
netstat -tunlp | grep nginx

 

 

 

 

 

 

    

posted @ 2019-01-28 20:54  孔雀东南飞  阅读(119)  评论(0编辑  收藏  举报