一、安装依赖
yum install -y automake pcre pcre-devel zlip zlib-devel openssl openssl-devel
二、下载安装包
wget http://nginx.org/download/nginx-1.10.2.tar.gz
tar xvf nginx-1.10.2.tar.gz
cd nginx-1.10.2
三、生成mak
work_dir=/home/ai_rd/server
./configure --prefix=/home/ai_rd/server/nginx \
--sbin-path=/home/ai_rd/server/nginx/sbin/nginx \
--conf-path=/home/ai_rd/server/nginx/conf/nginx.conf \
--error-log-path=/home/ai_rd/server/nginx/logs/error.log \
--http-log-path=/home/ai_rd/server/nginx/logs/access.log \
--pid-path=/home/ai_rd/server/nginx/logs/nginx.pid \
--lock-path=/home/ai_rd/server/nginx/logs/nginx.lock \
--user=nginx --group=nginx \
--with-http_ssl_module \
--with-http_stub_status_module \
--with-http_gzip_static_module \
--http-client-body-temp-path=/home/ai_rd/server/nginx/logs/client/ \
--http-proxy-temp-path=/home/ai_rd/server/nginx/logs/proxy/ \
--http-fastcgi-temp-path=/home/ai_rd/server/nginx/logs/fcgi/ \
--http-uwsgi-temp-path=/home/ai_rd/server/nginx/logs/uwsgi \
--http-scgi-temp-path=/home/ai_rd/server/nginx/logs/scgi \
--with-pcre
四、编译&安装
make
make install