nginx添加模块(非覆盖安装)
时间:2010-12-20 来源:nianzong
原已经安装好的nginx,现在需要添加一个未被编译安装的模块:
nginx -V 可以查看原来编译时都带了哪些参数
原来的参数:
--prefix=/app/nginx
添加的参数:
--with-http_stub_status_module --with-http_ssl_module --with-http_realip_module
nginx -V 可以查看原来编译时都带了哪些参数
原来的参数:
--prefix=/app/nginx
添加的参数:
--with-http_stub_status_module --with-http_ssl_module --with-http_realip_module
步骤如下:
1. 使用参数重新配置:
./configure --user=nobody --group=nobody --prefix=/app/nginx \
--with-http_stub_status_module --with-http_ssl_module --with-http_realip_module
2. 编译:
make
#不要make install,否则就是覆盖安装
3. 替换nginx二进制文件:
cp /app/nginx/sbin/nginx /app/nginx/sbin/nginx.bak
cp ./objs/nginx /app/nginx/sbin/
相关阅读 更多 +
排行榜 更多 +