標籤:style http io color ar sp for 檔案 div
1:Apache 官方網http://httpd.apache.org/下載所需安裝包 httpd-2.4.10.tar.gz
2: 上傳到伺服器 目錄自行決定 tar -zxvf 3:mv httpd-2.4.10 apache
cd apache
設定安裝參數,命令如下:
./configure --prefix=/usr/local/apache --enable-module=so
4:可能會出現以下錯誤
checking for APR... no configure: error: APR not found . Please read the documentation.
則需要安裝apr-1.4.2.tar.gz
5:下載apr-1.4.2.tar.gz
a):上傳到伺服器,tar -zxvf apr-1.4.2.tar.gz
b): cd apr-1.4.2
c): ./configure
d):make , make install
6:再次檢查編譯環境出現 ,可能會出現以下錯誤
checking for APR-util... no configure: error: APR-util not found . Please read the documentation.
7:下載apr-util-1.3.9.tar.gz
a):上傳到伺服器,tar -zxvf apr-util-1.3.9.tar.gz
b): cd apr-util-1.3.9
c): ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
d):make , make install
8:再次檢查編譯環境出現 ,可能./configure仍提示APR-util not found,增加--with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util後出現
configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/
9:下載pcre-8.10.zip
a):上傳到伺服器,unzip -o pcre-8.10.zip
b): cd pcre-8.10
c): ./configure --prefix=/usr/local/pcre
d):make , make install
10:繼續安裝Apache/httpd
./configure --with-apr=/usr/local/apr/ --with-apr-util=/usr/local/apr-util/ --with-pcre=/usr/local/pare
make
make install
11:進入到/usr/local/apache 修改PATH環境變數, 在登入使用者的home目錄開啟.bash_profile,在檔案中添加一行 PATH=$PATH:/usr/local/apache/bin
12: apachectl start 啟動 預設連接埠:80
13:http://ip:80 出現it works!表示正常配置。
14:說明:文檔中出現的路徑都是我自己伺服器路徑,並且注意安裝版本,其他可能存在不相容問題,
http://download.csdn.net/detail/tangyuanshark/7713369
這裡的幾個安裝檔案我已經測試,正常安裝。
linux下安裝apache