1.安装安装GCC组件和GCC -C++ 组件
yum -y install gcc
yum -y install gcc-c++
如果已经安装该环境可以跳过第一步直接进入第二步安装
2.安装Perl 5
tar -xzf perl-5.24.0.tar.gz
cd perl-5.24.0
./Configure -des -Dprefix=$HOME/localperl
make
make test
make install
3.安装openssl
tar -zxvf openssl-1.0.2.tar.gz
cd openssl-1.0.2
./config
make
make install
4.安装zlib
tar -zxvf zlib-1.2.11.tar.gz
cd zlib-1.2.11
./configure
make
make install
5.安装pcre
tar -zxvf pcre-8.42.tar.gz
cd pcre-8.42
./configure
make
make install
6.安装Nginx
tar -zxvf nginx-1.10.3.tar.gz
cd nginx-1.10.3
./configure --with-pcre=../pcre-8.42 --with-zlib=../zlib-1.2.11 --with-openssl=../openssl-fips-1.0.2
make
make install
7.启动nginx
/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
8.相关命令
重启:
cd /usr/local/nginx/sbin/
./nginx -s reload