Ubuntu系統(tǒng)下的Nginx服務器軟件安裝時的常見錯誤解決
更新時間:2016年03月04日 16:01:16 作者:張大鵬
這篇文章主要介紹了Ubuntu系統(tǒng)下的Nginx服務器軟件安裝時的常見問題解決,包括徹底卸載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
如果沒有提示,證明卸載成功,嘿嘿~
相關文章
Nginx實現(xiàn)外網(wǎng)訪問內網(wǎng)的步驟詳解
外網(wǎng)瀏覽器與內網(wǎng)是不通的,但是外網(wǎng)與中間過渡服務器是通的,中間過渡服務器與內網(wǎng)服務器是通的,這樣在外網(wǎng)訪問過渡服務器時,過渡服務器再跳轉到后臺服務器,本文給大家介紹了Nginx外網(wǎng)訪問內網(wǎng)如何實現(xiàn)步驟,需要的朋友可以參考下2023-10-10
centos環(huán)境下nginx高可用集群的搭建指南
為了防止Nginx單點故障造成服務器癱瘓,本文介紹了Nginx實現(xiàn)高可用集群構建,下面這篇文章主要給大家介紹了關于centos環(huán)境下nginx高可用集群的搭建指南,文中通過實例代碼介紹的非常詳細,需要的朋友可以參考下2022-07-07
使用log_format為Nginx服務器設置更詳細的日志格式方法
下面小編就為大家分享一篇使用log_format為Nginx服務器設置更詳細的日志格式方法,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧2018-03-03

