首頁  >  文章  >  運維  >  編譯過的nginx如何新增模組

編譯過的nginx如何新增模組

王林
王林轉載
2020-10-23 15:57:232450瀏覽

編譯過的nginx如何新增模組

查看已有模組

(推薦教學:nginx教學

/usr/local/nginx/sbin/nginx -V

這裡我是安裝了設定SSL想在此加上FastDFS模組

編譯過的nginx如何新增模組

將紅色的地方複製出來記到一個小本本上

./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --add-module=/usr/local/fastdfs-nginx-module/src/

編譯過的nginx如何新增模組

2.重新編譯Nginx

在此位置重新執行上面的:./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --add-module=/usr /local/fastdfs-nginx-module/src/

編譯過的nginx如何新增模組

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

make    //千万不要make install,不然就真的覆盖了

先備份一波,備胎還是需要的

/usr/local/nginx/sbin/nginx /usr/local/nginx/sbin/nginx.bak

將編譯的文件複製到你原來的sbin 目錄裡

cp ./objs/nginx /usr/local/nginx/sbin/

OK 新模組安裝完成該怎麼用和以前一樣,只是添加了新的模組

以上是編譯過的nginx如何新增模組的詳細內容。更多資訊請關注PHP中文網其他相關文章!

陳述:
本文轉載於:csdn.net。如有侵權,請聯絡admin@php.cn刪除