linux下Apache安裝

Linux上安裝Apache時,編譯出現錯誤: 

  代碼  收藏代碼  

  1. checking for APR... no  
  2. configure: error: APR not found .  Please read the documentation  


 安裝APR,下載所需軟件包,如果此時計算機可以上網,執行命令下載文件:

   代碼  收藏代碼  
  1. wget http://archive.apache.org/dist/apr/apr-1.4.5.tar.gz  
  2. wget http://archive.apache.org/dist/apr/apr-util-1.3.12.tar.gz  
  3. wget http://jaist.dl.sourceforge.net/project/pcre/pcre/8.10/pcre-8.10.zip  

下載gcc

  代碼  收藏代碼 
  1. yum -y install gcc+ gcc-c++

apr not found問題

代碼  收藏代碼  
  1. tar -zxf apr-1.4.5.tar.gz  
  2. cd  apr-1.4.5  
  3. ./configure --prefix=/usr/local/apr  
  4. make && make install  

 

APR-util not found問題

代碼  收藏代碼  
  1. tar -zxf apr-util-1.3.12.tar.gz  
  2. cd apr-util-1.3.12  
  3. ./configure --prefix=/usr/local/apr-util -with-apr=/usr/local/apr/bin/apr-1-config  
  4. make && make install  

 

pcre問題

代碼  收藏代碼  
  1. unzip -o pcre-8.10.zip  
  2. cd pcre-8.10  
  3. ./configure --prefix=/usr/local/pcre  
  4. make && make install  

 

編譯:

代碼  收藏代碼  
  1. ./configure --prefix=/usr/local/apache2 --enable-so --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/ --with-pcre=/usr/local/pcre  

 

啓動

代碼  收藏代碼  
  1. /usr/local/apache2/bin/apachectl start  

 


感謝ITEYE網站看 java小強 原創! http://cuisuqiang.iteye.com/


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章