Ubuntu系統(tǒng)下的Nginx服務(wù)器軟件安裝時的常見錯誤解決
更新時間:2016年03月04日 16:01:16 作者:張大鵬
這篇文章主要介紹了Ubuntu系統(tǒng)下的Nginx服務(wù)器軟件安裝時的常見問題解決,包括徹底卸載Nginx的方法介紹,需要的朋友可以參考下
Nginx安裝問題
下載nginx,地址:http://nginx.org/en/download.html
解壓安裝,這個不解釋
問題出現(xiàn)1:
./configure: error: the HTTP rewrite module requires the PCRE library. You can either disable the module by using --without-http_rewrite_module option, or install the PCRE library into the system, or build the PCRE library statically from the source with nginx by using --with-pcre=<path> option.
解決1:
sudo apt-get install libpcre3 libpcre3-dev
問題出現(xiàn)2:
./configure: error: the HTTP gzip module requires the zlib library. You can either disable the module by using --without-http_gzip_module option, or install the zlib library into the system, or build the zlib library statically from the source with nginx by using --with-zlib=<path> option.
解決2:
下載zlib庫,地址:http://www.zlib.net/
直接解壓安裝
which zlib
查看一下,有可能還需要安裝:
sudo apt-get install openssl libssl-dev
執(zhí)行configure操作:
./configure –prefix=/usr/local/nginx –pid-path=/var/run/nginx.pid--with-http_stub_status_module –with-http_ssl_module make make install
啟動:
/usr/local/nginx/sbin/nginx
測試:
curl -i http://localhost
干凈卸載nginx
命令:
sudo apt-get --purge autoremove nginx
命令:
which nginx
如果沒有提示,證明卸載成功,嘿嘿~
相關(guān)文章
一次nginx 504 Gateway Time-out錯誤排查、解決記錄
這篇文章主要介紹了一次nginx 504 Gateway Time-out錯誤排查、解決記錄,經(jīng)過反復(fù)檢查,發(fā)現(xiàn)造成這個問題的原因就是PHP的CURL沒有設(shè)置超時時間,解決辦法只要設(shè)置超時時間或者修改一下nginx的配置即可解決,需要的朋友可以參考下2014-05-05詳解Keepalived+Nginx實現(xiàn)高可用(HA)
這篇文章主要介紹了詳解Keepalived+Nginx實現(xiàn)高可用(HA),小編覺得挺不錯的,現(xiàn)在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧2018-06-06LNMPA遇到504 Gateway time-out錯誤的解決方法
這篇文章主要介紹了LNMPA遇到504 Gateway time-out錯誤的解決方法,需要的朋友可以參考下2017-07-07