Linux下安裝Apache httpd server

http://httpd.apache.org/docs/2.4/install.html

1. 安裝依賴庫 ARP, ARP-Util, PCRE

下載地址
http://apr.apache.org/download.cgi
http://www.pcre.org/

安裝ARP
# tar zxf apr-1.5.2.tar.gz
# cd apr-1.5.2
# ./configure --prefix=/usr/local/apr
# make
# make install

安裝ARP-Util
# tar zxf apr-util-1.5.4.tar.gz
# cd apr-util-1.5.4
# ./configure  --with-apr=/usr/local/apr
# make
# make install

安裝PCRE
# tar zxf pcre-8.37.tar.gz
# cd pcre-8.37
# ./configure
# make
# make install

2. 下載及安裝 Apache httpd

下載源碼
http://httpd.apache.org/download.cgi#apache24

安裝
# tar xzf httpd-2.4.18.tar.gz 
# cd httpd-2.4.18
# ./configure --enable-mods-shared=all #默認安裝在/usr/local/apache2
# make
# make install

配置
# vim /usr/local/apache2/conf/httpd.conf
--------
# Change this to Listen on specific IP addresses as shown below to 
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78:80
Listen 8088
--------

啓動/停止
# /usr/local/apache2/bin/apachectl -k start
# /usr/local/apache2/bin/apachectl -k stop

在瀏覽器訪問 {IP}:8088
It works!
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章