Red Hat Enterprise Linux Server release 5.4 (Tikanga)
一 步骤概览:(摘自apache官网)
Download$ http://httpd.apache.org/download.cgi
Extract$ gzip -d httpd-NN.tar.gz
$ tar xvf httpd-NN.tar
$ cd httpd-NNConfigure$ ./configure --prefix=PREFIXCompile$ makeInstall$ make installCustomize$ vi PREFIX/conf/httpd.confTest$ PREFIX/bin/apachectl -k start NN must be replaced with the current version number, and PREFIX must be replaced with the filesystem path under which the server shouldbe installed. If PREFIX is not specified, it defaults to /usr/local/apache2.
--NN 代表版本号,PREFIX指定安装路径,不指定的话默认:/usr/local/apache2.
二、系统要求:(不满足后续安装会提示错误)
APR and APR-Util
Perl-Compatible Regular Expressions Library (PCRE)
三、安装步骤:(满足系统要求)
1.解决apr not found问题
[iyunv@yahootest]# tar -zxf apr-1.4.5.tar.gz
[iyunv@yahoo apr-1.4.5]#./configure --prefix=/usr/local/apr
[iyunv@yahoo apr-1.4.5]#make
[iyunv@yahoo apr-1.4.5]#make install
2.解决APR-util not found问题
[iyunv@yahoo test]# tar -zxfapr-util-1.3.12.tar.gz
[iyunv@yahooapr-util-1.3.12]# ./configure --prefix=/usr/local/apr-util-with-apr=/usr/local/apr/bin/apr-1-config
[iyunv@yahoo apr-util-1.3.12]# make
[iyunv@yahoo apr-util-1.3.12]# make install
3 ../configure仍提示APR-util notfound,增加--with-apr=/usr/local/apr--with-apr-util=/usr/local/apr-util后出现
configure: error: pcre-config for libpcre not found. PCRE isrequired and available from http://pcre.org/
#./configure –help | grep pcre
--with-pcre=PATH Use external PCRE library
[iyunv@yahoo httpd-2.3.12-beta]# make
[iyunv@yahoo httpd-2.3.12-beta]# make install
[iyunv@yahoo httpd-2.3.12-beta]# /usr/local/apache2/bin/apachectlstart