软件都下载在到 /usr/local 目录下
安装贬义工具(nginx安装之前需要编译)
yum install -y gcc gcc-c++
安装PCRE
下载
wget http://downloads.sourceforge.net/project/pcre/pcre/8.35/pcre-8.35.tar.gz
解压
tar -zxvf pcre-8.35.tar.gz
进入pcre目录
./configure
编译安装
make && make install
安装SSL库
wget http://www.openssl.org/source/openssl-1.0.1j.tar.gz
tar -zxvf openssl-1.0.1j.tar.gz
cd openssl-1.0.1j
./config
make && make install
安装zlib库
wget http://zlib.net/zlib-1.2.11.tar.gz
tar -zxvf zlib-1.2.11.tar.gz
cd zlib-1.2.11
./configure
make && make install
安装nginx
wget http:// nginx.org/download/nginx-1.16.1.tar.gz
tar -zxvf nginx-1.16.1.tar.gz
mkdir -p server/nginx
cd nginx-1.16.1
./configure --prefix=/usr/local/server/nginx --with-http_stub_status_module --with-http_ssl_module --with-pcre=/usr/local/pcre-8.35
make && make install
# 如果再配置过程中出现以下错误
./configure:error: SSL modules require the OpenSSL library.
#执行:yum -y install openssl openssl-devel
配置nginx
vim /usr/local/server/nginx/conf/nginx.conf
网友评论