以gunzip這個模塊為例,講述一下,在nginx中如何安裝新的模塊
1、首先查看nginx已經安裝了哪些模塊。
nginx –V
2、發現沒有gunzip模塊,安裝
進入nginx的安裝目錄中,不是nginx的軟件目錄。
在已有模塊種寫上要安裝的模塊,執行下邊的命令
./configure \
--prefix=/usr/local/ywgh/nginx \
--http-client-body-temp-path=/tmp/clientbody \
--http-proxy-temp-path=/tmp/proxy \
--http-fastcgi-temp-path=/tmp/fastcgi \
--http-uwsgi-temp-path=/tmp/uwsgi \
--http-scgi-temp-path=/tmp/scgi \
--user=www \
--group=www \
--with-file-aio \
--with-http_realip_module \
--with-http_ssl_module \
--with-openssl=/usr/local/src/software/nginx/openssl \
--with-http_gunzip_module \
--with-http_gzip_static_module \
--with-zlib=/usr/local/src/software/nginx/zlib \
--with-http_stub_status_module \
--with-pcre=/usr/local/src/software/nginx/pcre \
3、然后編譯,覆蓋
直接make就行,不需要再make install了,如果要重新安裝就使用make install,就直接覆蓋了。
然后新產生的可執行文件nginx在安裝目錄中的objs目錄下。
將objs目錄下的nginx 復制到軟件位置的nginx中。進行覆蓋就可以了。覆蓋的時候,需要先關閉nginx
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。