編譯安裝Nginx及所需的依賴包以及常用插件


下載nginx包,具體版本查看Nginx官方下載地址

wget http://nginx.org/download/nginx-1.17.10.tar.gz

一些編譯安裝要用到的依賴包

gcc  gcc-c++  make pcre-devel zlib-devel openssl-devel

openssl-devel(用於加密)

常用插件

--prefix=/usr/local/nginx \
--user=nginx \
--group=nginx \
--with-http_stub_status_module \
--with-http_ssl_module \
--with-http_flv_module \
--with-http_gzip_static_module

--prefix=/usr/local/nginx(指定安裝路徑)
--user=nginx --group=nginx(指定運行用戶和組)
--with-http_stub_status_module(啟用該模塊以支持狀態統計)
--with-http_ssl_module(啟用SSL模塊)
--with-http_flv_module(啟用FLV模塊,提供尋求內存使用基於時間的偏移量文件)
--with-http_gzip_static_module(預讀gzip功能)

常用插件2 (內含stream模塊反向代理)

--prefix=/usr/local/nginx \
--with-http_stub_status_module \
--with-http_ssl_module \
--with-http_realip_module \
--with-http_flv_module \
--with-http_mp4_module \
--with-http_gzip_static_module \
--with-stream \
--with-stream_realip_module \
--with-stream_ssl_module && make && make install

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM