天天看點

下載下傳源代碼編譯安裝

  一、從官網下載下傳壓縮的包(建議去官網下載下傳,可以省去很多麻煩),如果不知道官網可以應用rpm -qi 包名 可以看到該包的許多詳細資訊。

   二、解壓縮,一般情況下都會使用tar壓縮,是以使用tar -xvf 可以解開壓縮包,然後進入已經解壓的包裡。

   三、./configure --prefix=/app/apache24 --sysconfdir=/etc/apache24 --enable-rewrite

使用該指令,進行檔案配置和各種檔案分類。

   四、make&&make install 進行編譯

   五、啟動服務 

/app/apache24/bin/apachectl start

   同時檢查防火牆:iptable -vnL 

   如果沒有關閉:centos6:service iptable stop

                 永久關閉:chkconfig iptable off

            centos7:systemctl stop firewall.service

           永久關閉:systemctl disable firewalld.service

   監控視窗80是否開啟:

     檢視端口:ss -ntl

     啟動服務:service httpd start

本文轉自 LUksl 51CTO部落格,原文連結:http://blog.51cto.com/19940919/1956555