系统平台:CentOS 6.8 64位。
安装编译工具及库文件
yum -y install wget make zlib zlib-devel gcc-c++ gcc libtool openssl openssl-devel
首先要安装 PCRE
下载 PCRE 安装包,下载地址: http://downloads.sourceforge.net/project/pcre/pcre/8.35/pcre-8.35.tar.gz
cd /opt
wget http://downloads.sourceforge.net/project/pcre/pcre/8.35/pcre-8.35.tar.gz
tar zxvf pcre-8.35.tar.gz
cd pcre-8.35
./configure
make && make install
安装 Nginx
下载 Nginx,下载地址:http://nginx.org/download/nginx-1.6.2.tar.gz
cd /opt
wget http://nginx.org/download/nginx-1.6.2.tar.gz
tar zxvf nginx-1.6.2.tar.gz
cd nginx-1.6.2
./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-pcre=/opt/pcre-8.35 make make install
/usr/local/nginx/sbin/nginx /启动nginx/(重启命令:/usr/local/nginx/sbin/nginx -s reload) 最后,开放防火墙80端口。测试正常
over!
3 评论