Debian 8编译nginx前的准备工作:
apt-get install -y gcc make vim
apt-get install libpcre+*
apt-get install -y grep zlib1g*
apt-get install -y libssl1.0.0
apt-get install -y libssl-dev
编译nginx:
[email protected]:~/$ tar zxvf nginx-1.9.6.tar.gz
[email protected]:~/$ cd nginx-1.9.6/
[email protected]:~/nginx-1.9.6$ ./configure
[email protected]:~/nginx-1.9.6$ make
[email protected]:~/nginx-1.9.6$ make install
自启动:
由于试了好多脚本都不OK,也懒得去管了,就直接rc.local,添加
/usr/local/nginx/sbin/nginx
时间: 2024-10-05 09:04:38