1.下載nginx?http://nginx.org/en/download.html
2.下載安裝pcre
下載地址: ?http://www.pcre.org/
tar -zxvf pcre2-10.39.tar.gz
mv pcre2-10.39 pcre
cd pcre
./configure
make install
3.下載安裝zlib
下載地址: ?http://www.zlib.net/
tar -zxvf zlib-1.2.12.tar.gz
mv zlib-1.2.12 zlib
cd zlib
./configure
make install
4.安裝nginx
./configure --with-pcre=/usr/local/src/pcre --with-http_stub_status_module
vi ./objs/Makefile(注:刪除此文件1006行“./configure --disable-shared”)
make
make install
nginx默認(rèn)安裝到/usr/local下