依赖包下载:http://download.csdn.net/detail/si_info/8720933
如果机器没有编译器先安装
yum -y install gcc-c++
安装ssl:
cd /usr/local/
tar zxvf openssl-fips-2.0.2.tar.gz
cd openssl-fips-2.0.2
./config
make
make install
------------------------------------
安装zlib库:
cd /usr/local/
tar zxvf zlib-1.2.7.tar.gz
cd zlib-1.2.7
./configure
make
make install
-------------------------------------
安装pcre库:
cd /usr/local/
tar zxvf pcre-8.21.tar.gz
cd pcre-8.21
./configure
make
make install
-------------------------------------
安装Nginx:
cd /usr/local/
tar zxvf nginx-1.2.6.tar.gz
cd nginx-1.2.6
./configure --with-pcre=../pcre-8.21 --with-zlib=../zlib-1.2.7 --with-openssl=../openssl-fips-2.0.2
make
make install
--------------------------------------
启动:
/usr/local/nginx/sbin/nginx
检查是否启动成功:
netstat -ano|grep 80 有结果输入说明启动成功
浏览器访问此机器的 IP,出现 Welcome to nginx! 则表示 Nginx 已经安装并运行成功。