环境准备
yum install gcc-c++
yum install -y pcre pcre-devel
yum install -y zlib zlib-devel
yum install -y openssl openssl-devel
解压nginx压缩包
tar -zxvf nginx-1.8.0.tar.gz
进入nginx1.8的文件夹执行configure命令
./configure --prefix=/usr/local/nginx --pid-path=/var/run/nginx/nginx.pid --lock-path=/var/lock/nginx.lock --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --with-http_gzip_static_module --http-client-body-temp-path=/var/temp/nginx/client --http-proxy-temp-path=/var/temp/nginx/proxy --http-fastcgi-temp-path=/var/temp/nginx/fastcgi --http-uwsgi-temp-path=/var/temp/nginx/uwsgi --http-scgi-temp-path=/var/temp/nginx/scgi
还是在nginx1.8文件夹执行make和install
make
make install
启用nginx
mkdir /var/temp/nginx/client -p
cd /usr/local/nginx/sbin/
./nginx
ps aux|grep nginx
重新加载
./nginx -s reload
原文地址:https://www.cnblogs.com/shun998/p/12382792.html
时间: 2024-10-29 16:09:05