CentOS 6.2 二进制安装apache2.4.3出现configure: error: APR-util not found. Please read the documentation的解决方

一。准备环境
1.安装gcc
[root@localhost /]# yum install gcc gcc-c++

2.安装apr,apr-util
下载apr-1.4.6.tar.gz与apr-util-1.5.1.tar.gz,地址:http://apr.apache.org   ,上传至/usr/local,安装目录分别为/usr/local/apr 与/usr/local/apr-util

a.安装apr-1.4.6.tar.gz
[root@localhost local]# mkdir -p apr
[root@localhost local]# tar -zxf apr-1.4.6.tar.gz
[root@localhost local]# cd apr-1.4.6
[root@yahoo apr-1.4.6]# ./configure --prefix=/usr/local/apr
[root@yahoo apr-1.4.6]# make
[root@yahoo apr-1.4.6]# make install

b.安装apr-util-1.5.1.tar.gz
[root@localhost local]# mkdir -p apr-util
[root@localhost local]# tar -zxf apr-util-1.5.1.tar.gz
[root@localhost local]# cd apr-util-1.5.1
[root@yahoo apr-util-1.5.1]# ./configure --prefix=/usr/local/apr-util -with-apr=/usr/local/apr/bin/apr-1-config
[root@yahoo apr-util-1.5.1]# make
[root@yahoo apr-util-1.5.1]# make install

3.安装pcre-8.20.tar.gz
下载地址:http://sourceforge.net/projects/pcre/files/pcre/ ,上传至/usr/local,安装目录为/usr/local/pcre
[root@localhost local]# mkdir -p pcre
[root@localhost local]# tar -zxf pcre-8.20.tar.gz
[root@localhost local]# cd pcre-8.20
[root@yahoo pcre-8.20]# ./configure --prefix=/usr/local/pcre
[root@yahoo pcre-8.20]# make
[root@yahoo pcre-8.20]# make install

二。安装apache
1.下载httpd-2.4.3.tar.gz,地址是:http://httpd.apache.org/ ,上传至/usr/local,安装目录为/usr/local/apache2

2.安装
[root@localhost local]# mkdir -p /usr/local/apache2
[root@localhost local]# tar zxvf httpd-2.4.3.tar.gz
[root@localhost local]# cd httpd-2.4.3
[root@localhost httpd-2.4.3]# ./configure --prefix=/usr/local/apache2 --with-pcre=/usr/local/pcre --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util
[root@localhost httpd-2.4.3]# make
[root@localhost httpd-2.4.3]# make instll
用浏览器访问http:localhost,看到It works!,说明CentOS Apache安装成功了,恭喜您!

3.启动
第一种方法[root@localhost apache2]# /usr/local/apache2/bin/apachectl start

第二种方法[root@localhost apache2]#service httpd start

第二种方法[root@localhost apache2]#/etc/init.d/httpd start

三。安装出现的问题
1.configure: error: no acceptable cc found in $PATH
解决办法:yum install gcc gcc-c++

2.configure: error: APR not found. Please read the documentation.
解决方法:安装Apache的关联软件
如上安装apr-1.4.6.tar.gz

3.configure: error: APR-util not found. Please read the documentation
解决方法:安装apr-util
如上安装apr-util-1.5.1.tar.gz

4.configure: error: APR version 1.3.0 or later is required
主要是因为apr版本过低造成的,应该卸载相关旧版本

5. 启动时报错:
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
解救办法:绝对路径即可:/usr/local/apache2/bin/apachectl start

四。重要配置文件目录

/etc/httpd/conf/httpd.conf 最主要的配置文件
/usr/lib/httpd/modules:apache 支持很多的模块,所以你想要使用的模块默认都放置在此目录
/var/log/httpd apache默认的log
/var/www/html cenos默认的首页所在目录

五。配置apache,最后修改httpd.conf,使apache能使用php
增加如下参数
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps
    AddType image/x-icon .ico

DirectoryIndex index.php index.html index.html.var

CentOS 6.2 二进制安装apache2.4.3出现configure: error: APR-util not found. Please read the documentation的解决方的更多相关文章

  1. CentOS 7 离线环境安装nginx时报错:./configure: error: C compiler cc is not found

    先说解决方法: 在nginx目录下,查看objs/autoconf.err文件,该文件记录了具体的错误信息 vi objs/autoconf.err 一般就是缺少一些文件,因为我的gcc.g++也是离 ...

  2. Linux二进制安装apache2.4.25

    Linux二进制安装apache2.4.25 安装环境:CentOS 6.2 先检查是否安装了Apache 如通是通过rpm包安装的话直接用下面的命令:rpm -q httpd 也可以使用如下两种方法 ...

  3. CentOS下源码安装Apache2.4+PHP5.4+MySQL5.5

    一.准备(把所有的源文件放在‘/home/yuanjun’目录下) apr http://mirror.bjtu.edu.cn/apache/apr/apr-1.4.6.tar.gz apr-util ...

  4. centos 7.3二进制安装mariadb10.2.8完美步骤

    (1)在centos7系统上,yum info mariadb可以找到提供mariadb包的官方网站,在到官方网站下载最新的mariadb包,然后rz到linux系统上去 (2)准备用户 1.user ...

  5. Centos下安装apahce的configure: error: APR not found. Please read the documentation解决办法

    今天从Apache官网上http://httpd.apache.org/下载httpd web服务器,由于我的虚拟机上之前安装过,我先yum remove httpd进行卸载,然后重新安装.我采用的是 ...

  6. 转 Centos下安装apahce的configure: error: APR not found. Please read the documentation解决办法

    转自: http://www.cnblogs.com/Anker/p/3355573.html 今天从Apache官网上http://httpd.apache.org/下载httpd web服务器,由 ...

  7. [apache2.4]configure: error: APR not found. Please read the documentation.

    apache2.4 安装出现如下错误 ``` [lzz@localhost httpd-2.4.10]$ ./configure  checking for chosen layout... Apac ...

  8. Apache安装问题:configure: error: APR not found . Please read the documentation

    Linux上安装Apache时,编译出现错误: checking for APR... no configure: error: APR not found .  Please read the do ...

  9. linux 上安装apache 出现 configure: error: APR not found. Please read the documentation错误

    今日编译apache时出错: #./configure --prefix……检查编辑环境时出现: checking for APR... noconfigure: error: APR not fou ...

随机推荐

  1. Xcode之外的文档浏览工具--Dash (在iOS代码库中浏览本帖)

    链接地址:http://www.cocoachina.com/bbs/read.php?tid=273479 Xcode之外的文档浏览工具--Dash    (在iOS代码库中浏览本帖)       ...

  2. 我常用的iphone开发学习网站[原创]

    引用地址:http://www.cnblogs.com/fuleying/archive/2011/08/13/2137032.html Google 翻译 Box2d 托德的Box2D的教程! Bo ...

  3. BZOJ 1600: [Usaco2008 Oct]建造栅栏( dp )

    QAQ我没读过书...四边形都不会判定了 简单的dp.... --------------------------------------------------------------------- ...

  4. BZOJ 1646: [Usaco2007 Open]Catch That Cow 抓住那只牛( BFS )

    BFS... -------------------------------------------------------------------------------------------- ...

  5. BZOJ 1651: [Usaco2006 Feb]Stall Reservations 专用牛棚( 线段树 )

    线段树.. -------------------------------------------------------------------------------------- #includ ...

  6. 如何使用SublimeText风格的代码高亮样式 添加Zed Coding(EMMET)插件

    因为觉得博客园自带的代码高亮样式很单一,不符合作为前端的我的审美习惯,于是下定决心要想办法折腾出一个方法来应用上另外一套代码高亮样式. 虽然探索的过程是很痛苦的,但最后还是成功了,但也不枉付出的那些努 ...

  7. @RequestParam

    @MVC另外一个特性是其提取和解析请求参数的能力.让我们继续重构上面的方法,并在其中添加@RequestParam注解: @RequestMapping("/accounts/show&qu ...

  8. 安装好maven后,在cmd中运行mvn报一下的错误

    当然报错,你这个路径下并没有pom.xml文件.你可以运行这个命令: mvn -version.

  9. 简单浮点数除法模拟-hdu-4493-Tutor

    题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=4493 题目意思: 给小数点后两位的12个月的工资,求出平均工资,输出离小数点后第二位最近的两位小数, ...

  10. VS2005+WINDDK+Driver Studio 3.2个人总结

    通过在网上搜索大量的资料,终于把环境搭建起来.对于我这样的驱动新手来说,理应把高手们的东西整理并总结下,方便以后的初学者. 这三个软件的安装顺序没有具体规定,也有高手推荐的顺序,我自己也是重复安装卸载 ...