centos 装apache

来源:互联网 发布:福建新闻频道网络直播 编辑:程序博客网 时间:2024/06/05 17:14
1、先安装下载各种软件源码包

apache httpd-2.4.4.tar.gz http://httpd.apache.org 

subvision subversion-1.7.10.tar.gzhttp://subversion.tigris.org/

apr-1.4.6.tar.gzapr-util-1.5.2.tar.gz http://apr.apache.org/download.cgi

2、解压

httpd-2.4.4 解压到/home/httpd-2.4.4

apr-1.4.6 解压到/home/httpd-2.4.4/srclib/apr(先解压再将文件夹改名)

apr-util-1.5.2 解压到/home/httpd-2.4.4/srclib/apr-util


subversion-1.7.10解压到哪都行

是这样的:

tar -zxvf htttp-2.4.4 -C/home/httpd-2.4.4

tar -zxvf apr-1.4.6.tar.gz -C/home/httpd-2.4.4/srclib/

tar -zxvfapr-util-1.5.2.tar.gz -C /home/httpd-2.4.4/srclib/

tar -zxvfsubversion-1.7.10

注意:解压后aprapr-util目录是带版本号的,把目录分别重命名成不带版本号的aprapr-util(见于INSTALL文档)

mv apr-1.4.5 apr

mv apr-util-1.5.2 apr-util

3、安装

先安装apr

./configure--prefix=/usr/local/apr

make&& make install

再安装apr-util

 

安装apr-util/usr/local/apr-util

./configure --prefix=/usr/local/apr-util--with-apr=/usr/local/apr

make&& make instal

再安装apache(这里的配置和make一再出现问题)原文

/configure--prefix=/usr/local/apache -enable-so -enable-proxy-enable-vhost-alias -enable-mods-shared=most -enable-dav-enable-maintainer-mode --with-apr=/usr/local/apr–with-apr-util=/usr/local/apr-util

make

make install;



(附:

安装subversion

/configure --prefix=/home/svn--enable-maintainer-mode--with-apr=/usr/local/apache/bin/apr-1-config--with-apxs=/usr/local/apache/bin/apxs–with-apr-util=/usr/local/apache/bin/apu-1-con

make;


其间,遇到的问题包括:

1、apr版本低提示:

checking for APR... configure: WARNING:APR version 1.4.0 or later is required, found 1.3.9
configure: WARNING: skipped APR at apr-1-config, version notacceptable
no
configure: error: APR not found. Please read thedocumentation.

于是重新下载安装的apr ,apr-util;

2、缺少pcre

提示:configure: error: pcre-config for libpcrenot found. PCRE is required and available fromhttp://pcre.org/

网址:http://pcre.org/

下载pcre-8.33.tar.gz 解压安装

./configure ;make;makeinstall;

3、bison未找到

make[2]: bison:命令未找到

make[2]: *** [util_expr_scan.c] 错误127

make[2]: Leaving directory`/home/aaron/httpd-2.4.4/server'

make[1]: *** [all-recursive] 错误1

于是:

yum search bison

yum installbision.x86_64

4、

make[2]: flex:命令未找到

make[2]: ***[util_expr_scan.c] 错误127

make[2]: Leaving directory`/home/aaron/httpd-2.4.4/server'

make[1]: ***[install-recursive] 错误1

make[1]: Leaving directory`/home/aaron/httpd-2.4.4/server'

make: ***[install-recursive] 错误1

于是:

yum search flex

yum installflex.x86_64

5、

/home/aaron/pcre-8.33/missing:line 81: aclocal-1.13: command not found

WARNING: 'aclocal-1.13' ismissing on your system.

You should only need it if youmodified 'acinclude.m4' or

'configure.ac' or m4 filesincluded by 'configure.ac'.

The 'aclocal' program is partof the GNU Automake package:

 

It also requires GNU Autoconf,GNU m4 and Perl in order to run:

 

 

<<ahref="http://www.perl.org/">http://www.perl.org/>

  1安装m4

  2安装autoconf

  3查看perl版本: perl -v 已安装perl.5.10

  4安装antomake

  5安装prec 成功


0 0
原创粉丝点击