国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 網站 > Nginx > 正文

Nginx為已安裝nginx動態添加模塊

2024-08-30 12:29:31
字體:
來源:轉載
供稿:網友

這里以安裝第三方ngx_http_google_filter_module模塊為例

nginx的模塊是需要重新編譯nginx,而不是像apache一樣配置文件引用.so

1. 下載第三方擴展模塊ngx_http_google_filter_module

# cd /data/software/ # git clone https://github.com/cuber/ngx_http_google_filter_module 

2. 查看nginx編譯安裝時安裝了哪些模塊

將命令行切換到nginx執行程序所在的目錄并輸入./nginx -V,具體如下:

[root@liuyazhuang121 sbin]# ./nginx -V nginx version: nginx/1.9.3 built by gcc 4.4.7 20120313 (Red Hat 4.4.7-17) (GCC) built with OpenSSL 1.0.2 22 Jan 2015 TLS SNI support enabled configure arguments: --prefix=/usr/local/nginx-1.9.3 --with-openssl=/usr/local/src/openssl-1.0.2 --with-pcre=/usr/local/src/pcre-8.37 --with-zlib=/usr/local/src/zlib-1.2.8 --with-http_ssl_module [root@liuyazhuang121 sbin]# 

可以看出編譯安裝使用了--prefix=/usr/local/nginx-1.9.3 --with-openssl=/usr/local/src/openssl-1.0.2 --with-pcre=/usr/local/src/pcre-8.37 --with-zlib=/usr/local/src/zlib-1.2.8 --with-http_ssl_module這些參數。

3. 加入需要安裝的模塊,重新編譯

這里添加-–add-module=/data/software/ngx_http_google_filter_module
具體如下:

 

復制代碼 代碼如下:

./configure  --prefix=/usr/local/nginx-1.9.3 --with-openssl=/usr/local/src/openssl-1.0.2 --with-pcre=/usr/local/src/pcre-8.37 --with-zlib=/usr/local/src/zlib-1.2.8 --with-http_ssl_module -–add-module=/data/software/ngx_http_google_filter_module 

 

如上,將之前安裝Nginx的參數全部加上,最后添加-–add-module=/data/software/ngx_http_google_filter_module
之后,我們要進行編譯操作,如下:

# make //千萬不要make install,不然就真的覆蓋 

4. 替換nginx二進制文件

# 備份原來的nginx執行程序 # cp /usr/local/nginx-1.9.3/sbin/nginx /usr/local/nginx-1.9.3/sbin/nginx.bak # 將新編譯的nginx執行程序復制到/usr/local/nginx/sbin/目錄下 # cp /opt/nginx/nginx /usr/local/nginx/sbin/ 

以上就是本文的全部內容,希望對大家的學習有所幫助,也希望大家多多支持VEVB武林網。


注:相關教程知識閱讀請移步到服務器教程頻道。
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 腾冲县| 都安| 阿合奇县| 沾化县| 淮阳县| 清原| 博湖县| 醴陵市| 乐东| 延安市| 象山县| 蓬安县| 永年县| 巴林右旗| 永新县| 十堰市| 客服| 铜川市| 洛隆县| 陆川县| 射阳县| 高邮市| 璧山县| 巨野县| 喀什市| 始兴县| 宣化县| 灵石县| 岳普湖县| 宁化县| 格尔木市| 北安市| 扶余县| 广德县| 松溪县| 贞丰县| 漳浦县| 景德镇市| 汽车| 静乐县| 静乐县|