在已经安装好的Nginx上增加新模块

在现有的web服务器上增加新的模块实现更为丰富的功能,Nginx算是比较常用的web服务器, nginx不仅仅可以做web服务器,只要安装对应的插件还可作反向代理、即时通讯、文件下载、流媒体服务等功能,有时候我们已经安装好了Nginx,改变用途或者发现缺少用到没有安装的模块,可是我们又不想重新安装覆盖已经安装的nginx,我们该如何新增模块呢?下面通过安装--with-mail_ssl_module作为示例进行说明,安装其他模块也是同样的道理。
1、 当前nginx:
/usr/local/nginx-1.6.3/sbin/nginx –V
configure arguments: --prefix=/usr/local/nginx-1.6.3 --with-http_ssl_module --with-http_spdy_module --with-http_stub_status_module --with-pcre --with-http_realip_module --add-module=/root/ngx_cache_purge-1.3
2、 安装:
解压相同版本的nginx源码包(以前安装时的源码包)
tar zxf nginx-1.6.3.tar.gz
cd nginx-1.6.3
./configure (原来的参数) --prefix=/usr/local/nginx-1.6.3 --with-http_ssl_module --with-http_spdy_module --with-http_stub_status_module --with-pcre --with-http_realip_module --add-module=/root/ngx_cache_purge-1.3 --with-mail_ssl_module
编译:make
但是不要make install,这样会覆盖原程序。
mv /usr/local/nginx-1.6.3/sbin/nginx /usr/local/nginx-1.6.3/sbin/nginx_bak
cp objs/nginx /usr/local/nginx-1.6.3/sbin/
3、 验证,查看一下nginx的模块情况
/usr/local/nginx-1.6.3/sbin/nginx –V
configure arguments: --prefix=/usr/local/nginx-1.6.3 --with-http_ssl_module --with-http_spdy_module --with-http_stub_status_module --with-pcre --with-http_realip_module --add-module=/root/ngx_cache_purge-1.3 --with-mail_ssl_module

创新互联建站自2013年创立以来,先为蒙城等服务建站,蒙城等地企业,进行企业商务咨询服务。为蒙城企业网站制作PC+手机+微官网三网同步一站式服务解决您的所有建站问题。


分享标题:在已经安装好的Nginx上增加新模块
当前网址:http://www.csruizhi.cn/article/jjjhge.html

其他资讯

Copyright © 2007-2024 成都优众联杰科技有限公司 All Rights Reserved 蜀ICP备2024116266号
友情链接: 网站建设费用 成都营销网站制作 成都模版网站建设 高端网站建设 移动网站建设 高端品牌网站建设 做网站设计 成都网站建设 外贸营销网站建设 成都网站设计 成都网站设计制作公司 古蔺网站建设 成都做网站建设公司 重庆电商网站建设 教育网站设计方案 成都网站设计 成都定制网站建设 LED网站设计方案 温江网站设计 成都网站建设 专业网站设计 泸州网站建设