1、安装make:
yum -y install gcc automake autoconf libtool make
2、安装gcc:
yum install gcc gcc-c++
3、安装pcre库
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.39.tar.gz
cd pcre-8.34
./configure
make
make install
4、安装zlib库
tar -zxvf zlib-1.2.11.tar.gz
cd zlib-1.2.11
./configure
make
make install
5、安装openssl
cd /usr/local/src
wget https://www.openssl.org/source/openssl-1.0.1t.tar.gz
tar -zxvf openssl-1.0.1t.tar.gz
cd openssl-1.0.1t
make
make install
6、安装nginx
./configure --sbin-path=/usr/local/nginx/sbin/nginx \
--conf-path=/usr/local/nginx/conf/nginx.conf \
--pid-path=/usr/local/nginx/nginx.pid \
--with-http_ssl_module \
--with-pcre=/app/nginx/pcre-8.35 \
--with-zlib=/app/nginx/zlib-1.2.11 \
--with-openssl=/app/nginx/openssl-1.0.1t \
--with-http_stub_status_module \
--add-module=/home/dgtopr/nginx_ajp_module-master
make
make install
启动nginx
/usr/local/nginx/sbin/nginx
如果访问nginx报403 403 Forbidden
原因可能是
SELinux设置为开启状态(enabled)的原因。
将其设为disabled
然后。Reboot重启
更多技术文章请关注公众号:架构师Plus,
扫码添加