nginx之前要安装PCRE |
wget -c ftp: //ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.34.tar.gz |
tar -zxvf pcre- 8.34 .tar.gz |
cd pcre- 8.34 |
./configure |
make && make install |
nginx编译安装 |
1 )下载 |
$wget -c http: //nginx.org/download/nginx-1.4.6.tar.gz |
2 )解压 |
$tar -xzvf nginx- 1.4 . 6 .tar.gz |
3 )编译 |
$cd nginx- 1.4 . 6 |
./configure --user=www --group=www \ |
--prefix=/maca/nginx \ |
--sbin-path=/maca/nginx/sbin/nginx \ |
--conf-path=/maca/nginx/conf/nginx.conf \ |
--with-http_stub_status_module \ |
--with-http_ssl_module \ |
--with-pcre \ |
--lock-path=/var/run/nginx.lock \ |
--pid-path=/var/run/nginx.pid |
make && make install |
启动 |
#/maca/nginx/sbin/nginx -c /maca/nginx/conf/nginx.conf |
停止 |
kill -QUIT pid |
启动报错处理 |
/sbin/nginx: error while loading shared libraries: libpcre.so. 1 : |
ln -s /usr/local/lib/libpcre.so. 1 /lib64 //源代码片段来自云代码http://yuncode.net |
|