Ubuntu系統(tǒng)下的Nginx服務(wù)器軟件安裝時(shí)的常見錯(cuò)誤解決
Nginx安裝問題
下載nginx,地址:http://nginx.org/en/download.html
解壓安裝,這個(gè)不解釋
問題出現(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庫(kù),地址: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
啟動(dòng):
/usr/local/nginx/sbin/nginx
測(cè)試:
curl -i http://localhost
干凈卸載nginx
命令:
sudo apt-get --purge autoremove nginx
命令:
which nginx
如果沒有提示,證明卸載成功,嘿嘿~
相關(guān)文章
nginx的location的優(yōu)先級(jí)和匹配方式
location是Nginx中的塊級(jí)指令,本文主要介紹了nginx的location的優(yōu)先級(jí)和匹配方式,具有一定的參考價(jià)值,感興趣的可以了解一下2023-10-10一次nginx 504 Gateway Time-out錯(cuò)誤排查、解決記錄
這篇文章主要介紹了一次nginx 504 Gateway Time-out錯(cuò)誤排查、解決記錄,經(jīng)過反復(fù)檢查,發(fā)現(xiàn)造成這個(gè)問題的原因就是PHP的CURL沒有設(shè)置超時(shí)時(shí)間,解決辦法只要設(shè)置超時(shí)時(shí)間或者修改一下nginx的配置即可解決,需要的朋友可以參考下2014-05-05詳解Keepalived+Nginx實(shí)現(xiàn)高可用(HA)
這篇文章主要介紹了詳解Keepalived+Nginx實(shí)現(xiàn)高可用(HA),小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過來看看吧2018-06-06配置ab來為Nginx服務(wù)器做壓力測(cè)試的方法
這篇文章主要介紹了配置ab來為Nginx服務(wù)器做壓力測(cè)試的方法,ab是針對(duì)Apache的測(cè)試工具但本文講解其測(cè)試Nginx的過程,需要的朋友可以參考下2016-01-01LNMPA遇到504 Gateway time-out錯(cuò)誤的解決方法
這篇文章主要介紹了LNMPA遇到504 Gateway time-out錯(cuò)誤的解決方法,需要的朋友可以參考下2017-07-07Nginx中配置過濾爬蟲的User-Agent的簡(jiǎn)單方法
這篇文章主要介紹了Nginx中配置過濾爬蟲的User-Agent的簡(jiǎn)單方法,文中羅列了一些常用搜索引擎的爬蟲名稱以免造成不必要的過濾,需要的朋友可以參考下2016-01-01