ubuntu 源码安装nginx
2019獨角獸企業重金招聘Python工程師標準>>>
下載nginx
地址:http://nginx.org/en/download.html
解壓安裝,這個不解釋
問題出現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問題出現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 執行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
轉載于:https://my.oschina.net/zhangdapeng89/blog/96986
總結
以上是生活随笔為你收集整理的ubuntu 源码安装nginx的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 记与公司内网微博的谈话
- 下一篇: linux 修改系统时区和时间