在ubuntu手动安装nginx1.6的/etc/init.d/nginx配置

Posted

手动安装升级到nginx1.6

cd tmp/
wget http://nginx.org/download/nginx-1.6.0.tar.gz
tar -zxvf nginx-1.6.0.tar.gz
cd nginx-1.6.0/
./configure --with-http_gzip_static_module --with-http_stub_status_module --with-http_ssl_module 
make 
sudo make install

/etc/init.d/nginx的配置脚本

sudo wget http://dlj.bz/OHaQ -O /etc/init.d/nginx
sudo chmod +x /etc/init.d/nginx

nginx常用脚本

service nginx status  # to poll for current status
service nginx stop    # to stop any servers if any
service nginx start   # to start the server

加入系统启动项

sudo update-rc.d -f nginx defaults

移除系统启动项

sudo update-rc.d -f nginx remove

######Resources


此文章 短链接: http://dlj.bz/zhSueI