下载源代码
下载地址
http://hg.nginx.org/nginx/archive/release-1.18.0.tar.gz
这里还是用1.18.0 stable版本
下载到 /data/working/nginx_src
解压
tar zxvf release-1.18.0.tar.gz
Nginx Sticky Module
因为主要是要添加 nginx sticky module, 所以还要下载 nginx sticky module, 下载地址在这儿
https://bitbucket.org/nginx-goodies/nginx-sticky-module-ng/get/08a395c66e42.zip
说明在这儿 https://bitbucket.org/nginx-goodies/nginx-sticky-module-ng/src/master/
从源代码安装的基本流程
./configure ... 一堆配置项
make
make install
看看通过yum 安装的nginx的配置, 通过命令
nginx -V
得到
--prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib64/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-compat --with-file-aio --with-threads --with-http_addition_module --with-http_auth_r