Nginx添加模块(非覆盖安装)

nginx -V 可以查看原来编译时都带了哪些参数


#################################### 安装 nginx-upstream-fair ############################
原来的参数:
	--prefix=/mnt/nginx
	
要添加的参数 [有就不用添加了]
	--with-http_stub_status_module --with-http_ssl_module --with-http_realip_module --add-module=/mnt/gnosek-nginx-upstream-fair-a18b409
	
	
再编译 [要把之前编译的参数加上]	
./configure --prefix=/usr/local/nginx --user=www --group=www --with-http_stub_status_module --with-http_v2_module --with-http_ssl_module --with-http_gzip_static_module --with-http_realip_module --with-http_flv_module --with-http_mp4_module --with-openssl=/root/oneinstack/src/openssl-1.0.2j --with-pcre=/root/oneinstack/src/pcre-8.39 --with-pcre-jit --with-ld-opt=-ljemalloc --add-module=/mnt/gnosek-nginx-upstream-fair-a18b409

	
编译 [不要make install,否则就是覆盖安装]
	make
	
停掉Nginx
	service nginx stop
	

备份 nginx 文件
	cp /usr/local/nginx/sbin/nginx /usr/local/nginx/sbin/nginx.bak
	
	
替换nginx二进制文件
	cp /mnt/nginx-1.10.2/objs/nginx /usr/local/nginx/sbin/
	
	如果提示:cp: overwrite ‘/usr/local/nginx/sbin/nginx’? 输入yes 或确认

重新启动 Nginx
		service nginx restart

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值