|
1、安装依赖
- yum -y install openssl openssl-devel;
- yum -y install pcre-devel;
- yum -y install libxml2 libxml2-dev;
- yum -y install libxslt-devel;
- yum install gd gd-devel;
复制代码 2、 下载Nginx源码包- curl -L https://nginx.org/download/nginx-1.18.0.tar.gz -o /opt/;
- wget url -P https://nginx.org/download/nginx-1.18.0.tar.gz -O /opt/;
复制代码 3、编译
- cd /opt/nginx-1.18.0;
- ./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 --with-http_stub_status_module --with-http_ssl_module --with-file-aio --with-http_realip_module --with-http_v2_module;
复制代码 4、nginx高级用法
|
|