nginx安裝

  1. 下載地址 http://nginx.org/en/download....
  2. 選擇下載Stable version
  3. 上傳到服務器
  4. 解壓到安裝目錄並刪除壓縮包
  5. 嘗試編譯nginx,先進入到ngixn目錄
cd /opt/nginx1.61
./configure --prefix=/opt/nginx
  1. 編譯確定不經過,須要安裝相關的依賴,安裝依賴(centos7.6)

==./configure: error: the HTTP rewrite module requires the PCRE library.==html

yum install -y pcre pcre-devel

==./configure: error: the HTTP gzip module requires the zlib library.==nginx

yum install -y zlib zlib-devel

建議再安裝下ssl的庫依賴centos

yum install -y openssl openssl-devel

總的來講就是服務器

yum install -y pcre  pcre-devel zlib zlib-devel openssl openssl-devel

在當前文件夾下會生成一個Makefile文件ui

  1. 編譯
make
  1. 安裝
make install
相關文章
相關標籤/搜索