系统:CentOS release 6.4 (Final) 2.6.32-358.el6.i686


################## 获取安装源码包 ######################

shell> wget http://cdn.mysql.com/Downloads/MySQL-5.6/mysql-5.6.13.tar.gz

shell> wget http://mirror.esocc.com/apache//httpd/httpd-2.4.6.tar.gz

shell> wget http://am1.php.net/distributions/php-5.5.1.tar.gz

shell> wget http://apache.etoak.com//apr/apr-1.4.8.tar.gz

shell> wget http://apache.etoak.com//apr/apr-util-1.5.2.tar.gz

shell> wget http://sourceforge.net/projects/pcre/files/pcre/8.33/pcre-8.33.tar.gz


################### 安装依赖 ###################


shell> yum install -y gcc gcc-c++ make


############ 解压apr库到源码包 #####################

shell> tar zxvf httpd-2.4.6.tar.gz

shell> cd /usr/local/src/httpd-2.4.6/srclib/

shell> tar zxvf apr-1.4.8.tar.gz

shell> mv apr-1.4.8/ apr/

shell> tar zxf /root/softs/apr-util-1.5.2.tar.gz

shell> mv apr-util-1.5.2/ apr-util/


############################ 安装pcre #################


shell> tar zxvf /root/softs/pcre-8.33.tar.gz

shell> cd pcre-8.33/

shell> yum install -y gcc gcc-c++ make

shell> ./configure –prefix=/usr/local/pcre/

shell> make

shell> make install


############################## 安装perl5 ################

shell> tar zxf /root/softs/perl-5.18.0.tar.gz

shell> cd perl-5.18.0/

shell> ./Configure -de -Dprefix=/usr/local/perl/

shell> make

shell> make install


########################## 编译安装apache ################


shell> ./configure –prefix=/usr/local/apache/ –with-included-apr –with-pcre=/usr/local/pcre/ –with-perl=/usr/local/perl/

shell> make

shell> make install


###################### 启动apache ####################


shell> bin/apachectl start


shell> /usr/local/apache/bin/httpd -V

Server version: Apache/2.4.6 (Unix)

Server built: Aug 8 2013 15:44:13

Server’s Module Magic Number: 20120211:23

Server loaded: APR 1.4.8, APR-UTIL 1.5.2

Compiled using: APR 1.4.8, APR-UTIL 1.5.2

Architecture: 32-bit

Server MPM: event

threaded: yes (fixed thread count)

forked: yes (variable process count)

Server compiled with….

-D APR_HAS_SENDFILE

-D APR_HAS_MMAP

-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)

-D APR_USE_SYSVSEM_SERIALIZE

-D APR_USE_PTHREAD_SERIALIZE

-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT

-D APR_HAS_OTHER_CHILD

-D AP_HAVE_RELIABLE_PIPED_LOGS

-D DYNAMIC_MODULE_LIMIT=256

-D HTTPD_ROOT=”/usr/local/apache/”

-D SUEXEC_BIN=”/usr/local/apache//bin/suexec”

-D DEFAULT_PIDLOG=”logs/httpd.pid”

-D DEFAULT_SCOREBOARD=”logs/apache_runtime_status”

-D DEFAULT_ERRORLOG=”logs/error_log”

-D AP_TYPES_CONFIG_FILE=”conf/mime.types”

-D SERVER_CONFIG_FILE=”conf/httpd.conf”




#################### 添加新模块 #############################

待续...