Apache安裝

sky850623發表於2015-10-16
********************
Apache安裝
********************
http://httpd.apache.org/docs/2.4/  官方文件
1.解壓
[root@ocp u01]# tar zxf httpd-2.4.17.tar.gz 
2.將包放到src下
[root@ocp u01]# mv httpd-2.4.17 /usr/local/src

3. 安裝 apache 依賴關聯包(共四個:apr,apr-iconv,apr-util,pcre)
(1)、安裝apr
# tar zxvf apr-1.3.8.tar.gz
# cd apr-1.3.8
# ./configure --prefix=/usr/local/apr
# make
# make install
(2)、安裝apr-iconv
# tar -zxvf apr-iconv-1.2.1.tar.gz
# cd apr-iconv-1.2.1
# ./configure --prefix=/usr/local/apr-iconv --with-apr=/usr/local/apr
# make
# make install

(3)、安裝apr-util
# tar zxvf apr-util-1.3.9.tar.gz
# cd apr-util-1.3.9
# ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr --with-apr-iconv=/usr/local/apr-iconv/bin/apriconv
# make
# make install
 (4)、安裝pcre
 下載地址:http://sourceforge.net/projects/pcre/files/
[root@ocp pcre-8.37]# tar zxf pcre-8.37.tar.gz
[root@ocp pcre-8.37]# cd pcre-8.37
[root@ocp pcre-8.37]# ./configure --prefix=/usr/local/pcre
# make
# make install

4.安裝apahce
[root@ocp httpd-2.4.17]# ./configure  --prefix=/usr/local/web/apache --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util  --with-pcre=/usr/local/pcre
[root@ocp httpd-2.4.17]# make
[root@ocp httpd-2.4.17]# make install

5.檢視是否安裝成功
[root@ocp httpd-2.4.17]# /usr/local/web/apache/bin/apachectl -v
Server version: Apache/2.4.17 (Unix)
Server built:   Sep 24 2015 10:16:05
出現版本資訊,說明安裝成功

6.啟動apache
[root@ocp httpd-2.4.17]# /usr/local/web/apache/bin/apachectl start

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26937943/viewspace-1814531/,如需轉載,請註明出處,否則將追究法律責任。

相關文章