yum install gcc gcc-c++ yum -y install zlib zlib-devel openssl openssl--devel pcre pcre-devel yum -y install gcc automake autoconf libtool make 2.安装PCRE库 ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/ 下载最新的 PCRE 源码包,使用下面命令下载编译和安装 PCRE 包: cd /usr/local/src wget 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 3.安装zlib库 http://zlib.net/zlib-1.2.8.tar.gz 下载最新的 zlib 源码包,使用下面命令下载编译和安装 zlib包: cd /usr/local/src wget http://zlib.net/zlib-1.2.8.tar.gz tar -zxvf zlib-1.2.8.tar.gz cd zlib-1.2.8./configure make make install 4.安装ssl(某些vps默认没装ssl) cd /usr/local/src wget http://www.openssl.org/source/openssl-1.0.1c.tar.gz tar -zxvf openssl-1.0.1c.tar.gz
./configure --sbin-path=/home/cent/ngx_source/sbin_ngx/nginx/nginx --conf-path=/home/cent/ngx_source/sbin_ngx/nginx/nginx.conf --with-openssl=../openssl-1.0.1c/ make sudo make install