1、查看旧nginx的安装参数:
nginx -V
nginx version: nginx/1.17.3 built by gcc 4.8.5 20150623 (Red Hat 4.8.5-28) (GCC) built with OpenSSL 1.0.2k-fips 23 Jan 2018 TLS SNI support enabled configure arguments: --prefix=/etc/nginx-1.17.3 --with-http_stub_status_module --with-http_ssl_module --add-module=/tmp/nginx-plugin-abc
2、下载源代码,解压进入文件夹,执行configure:
./configure --prefix=/home/nginx1.24.0 --sbin-path=/home/nginx1.24.0/sbin --modules-path=/home/nginx1.24.0/modules --conf-path=/home/nginx1.24.0/conf/nginx.conf --with-http_stub_status_module --with-http_ssl_module --add-module=/tmp/nginx-plugin-abc
3、在文件夹里执行make & make install
make & make install
4、指定配置文件启动,也可以不指定默认
/home/nginx1.24.0/nginx -c /etc/nginx/conf/nginx.conf
评论