1、下载nginx-1.4.7.tar.gz pcre-8.35.zip zlib-1.2.8.tar.gz 放在同一文件夹内
2、yum install gcc-c++ zip unzip
3、tar zxvf zlib-1.2.8.tar.gz
cd zlib-1.2.8
./configure --prefix=/usr/local/zlib
make
make install
4、unzip pcre-8.35.zip
cd pcre-8.35
./configure --prefix=/usr/local/pcre
make
make install
5、tar zxvf nginx-1.4.7.tar.gz
cd nginx-1.4.7
./configure --prefix=/usr/local/nginx --with-pcre=../pcre-8.35 --with-zlib=../zlib-1.2.8
make
make install