安裝ngix遇到的問題

ngingx安裝錯誤 ./configure: error: the HTTP rewrite module requires the PCRE library.

有時候,我們需要單獨安裝nginx,來處理大量的下載請求。單獨在Centos5安裝nginx遇到的rewrite和HTTP  cache錯誤解決辦法:

wget http://nginx.org/download/nginx-0.8.33.tar.gz
tar -zxvf nginx-0.8.33.tar.gz 
cd nginx-0.8.33
./configure --prefix=/usr/local/nginx

 

安裝Nginx時報錯

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

安裝pcre-devel解決問題
yum -y install pcre-devel



解決 RHEL 7/ CentOS 7/Fedora 出現Unit iptables.service failed to load

CentOS 7.0默認使用的是firewall作爲防火牆,這裏改爲iptables防火牆。
firewall:

1 systemctl start firewalld.service#啓動firewall
2 systemctl stop firewalld.service#停止firewall
3 systemctl disable firewalld.service#禁

改成iptables
firewall:

1 systemctl start iptables.service


2, 準備編譯環境 yum -y install gcc gcc+ gcc-c++ openssl openssl-devel pcre pcre-devel 三臺機器都進行安裝,並且創建兩個新用戶fastdfs 和nginx  

useradd fastdfs -M -s /sbin/nologin  useradd nginx -M -s /sbin/nologin

爲了方便測試 請關閉防火牆 service iptables stop

yum [Errno 256] No more mirrors to try 解決方法

  1. yum clean all
  2. yum makecache
3.yum install -y zlib-devel


發佈了45 篇原創文章 · 獲贊 26 · 訪問量 13萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章