引自:http://blog.chinaunix.net/uid-26881541-id-3336614.html

http://apr.apache.org/download.cgi

命令:

yum install wget ppl cloog-ppl mpfr cpp kernel-headers glibc-headers gibc-devel gcc-4.4.5-6

yum install wget gcc make mysql mysql-server mysql-devel httpd php php-mysql sendmail


apache下载地址:http://httpd.apache.org/download.cgi#apache24


到http://httpd.apache.org/下载以源码方式安装,我下载的版本是Apache httpd 2.4.3

解压:[root@localhost apache]# tar -jxvf httpd-2.4.3.tar.bz2

配置环境:

[root@localhost httpd-2.4.3]# ./configure --prefix=/usr/local/apache2  --enable-so --enable-mods-shared=all --enable-modules=most

提示configure: error: APR not found. Please read the documentation,

解决:
缺少Apr,下载http://projects.apache.org/indexes/quick.html

解压:[root@localhost apache]# tar zxvf apr-1.4.6.tar.gz

配置环境:

[root@localhost apr-1.4.6]# ./configure --prefix=/usr/local/apr/

编译和安装:

[root@localhost apr-1.4.6]#make

[root@localhost apr-1.4.6]#make install

编译安装完成apr之后,继续编译apache,又有如下的提示configure: error: APR-util not found.  Please read the documentation

解决:

缺少APR-util,http://apr.apache.org/下载

解压: [root@localhost apache]# tar zxvf apr-util-1.4.1.tar.gz

配置环境:

在 [root@localhost apr-util-1.4.1]./configure --prefix=/usr/local/apr-util -with- apr=/usr/local/apr/bin/apr-1-config时,提示configure: error: APR could not be located. Please use the --with-apr option,这是路径的问题(这个问题困扰我好久了,在这里找到了说明http://apache.jz123.cn/install.html),应该用下面的命令[root@localhost apr-util-1.4.1]./configure  --with-apr=/usr/local/

继续编译Apache,晕啊,仍没有成功,提示如下configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/

解决:

下载prce,网址http://sourceforge.net/projects/pcre/

解压:unzip pcre-8.31.zip

配置环境:

[root@localhost pcre-8.31]#./configure --prefix=/usr/local/

编译和安装:

[root@localhost pcre-8.31]#make

[root@localhost pcre-8.31]#make install

再次编译Apache,皇天不负有心人啊,终于通过了!此时运行httpd(service httpd start),在浏览器上输入127:0:0:1,就能看到下面的了

This page is used to test the proper operation of the Apache HTTP server after it has been installed. If you can read this page, it means that the Apache HTTP server installed at this site is working properly.

Apache编译与安装 RedHat enterprises 6.2的更多相关文章

  1. Apache:编译和安装

    1.在Fedora / CentOS / Red Hat Enterprise Linux上安装 sudo yum install httpd sudo systemctl enable httpd ...

  2. centos7下源码编译方式安装httpd

    前言 Apache至少需要apr.apr-util.pcre组件的支持. APR(Apache portable Run-time libraries,Apache可移植运行库)的目的如其名称一样,主 ...

  3. apache编译安装 httpd 2.2 httpd 2.4

    #apache编译安装#httpd 2.2 , httpd 2.4 #!/bin/sh #apache编译安装 #httpd 2.2 , httpd 2.4 #centos #rpm -e httpd ...

  4. apache编译安装参数说明

    apache编译安装参数说明 ./configure //配置源代码树--prefix=/usr/local/apache2 //体系无关文件的顶级安装目录prefix ,也就apache的安装目录. ...

  5. LANMP系列教程之Apache编译安装CentOS7环境

      1.准备好源码包并配置好yum源,需要的源码包包括:httpd-2.4.18.apr-1.5.2.tar.gz.apr-util-1.5.4.tar.gz 2.准备用户 groupadd -r a ...

  6. Apache编译安装

    1.准备好源码包并配置好yum源,需要的源码包包括:httpd-2.4.18.apr-1.5.2.tar.gz.apr-util-1.5.4.tar.gz 2.准备用户 groupadd -r apa ...

  7. Linux下编译,安装Apache httpd服务器

    环境:ubuntu 16.0.4 Apache官网下载Apache httpd压缩包:httpd-2.4.27.tar.gz,安装之前请确定安装了make工具,我安装的是GNU make 解压文件 s ...

  8. linux 编译式安装apache

    apache的安装需要两个组件,APR对于Tomcat最大的作用就是socket调度 组件下载解压完成 ,讲两个组件解压包移动到apache的类库文件夹内 注:如果系统自带了apr和apr-util可 ...

  9. Linux下编译、安装并启动apache

    安装步骤如下: 1.  首先去http://httpd.apache.org/download.cgi上下载需要的apache源码,然后存放至/usr/local/src下[此源码存放路径可任意指定] ...

随机推荐

  1. C#中窗体的互相访问

    1.在父窗体中构造子窗体对象时,将父窗体传递过去: 如:FrmSub frm=new FrmSub(this);//this代表父窗体 2.将父窗体中要访问的变量和方法修改为public 3.在子窗体 ...

  2. C# 顺序表操作

    虽然.NET已经是现实了Reverse(),但是学习算法有必要知道其是怎么实现的: private static void ReverseArray(int[] array) { int temp; ...

  3. 2.opencv图像处理常用操作

    图像的平滑处理 平滑,也称 模糊, 平滑处理时需要用到一个滤波器 .滤波器想象成一个包含加权系数的窗口,这个加权系数也叫做核或者模版. // 图像平滑处理分而学之.cpp : 定义控制台应用程序的入口 ...

  4. Splitter

    <!DOCTYPE html> <html> <head> <title>PDemo</title> </head> <b ...

  5. [转载]iOS面试题总

    转载自:http://blog.sina.com.cn/s/blog_67eb608b0101r6xb.html (2014-06-13 20:23:33) 转载▼ 标签: 转载   crash 原文 ...

  6. Pomodairo,番茄工作法-应用篇

    传统:              选择一个待完成的任务              将番茄时间设为适合自己的固定时间              专注工作,中途不允许做任何与该任务无关的事,直到番茄时钟响 ...

  7. cocos2dx中的动作

    CCAction是cocos2dx中专门用来处理动作相关的类,几乎所有的与动作相关的类都是从它派生而来的.而CCAction继承自CCObject class CCFiniteTimeAction : ...

  8. Getting Started with Java

    “学前”说明:<Learn Java for Android>这本书内容很多,都是精华,建议大家看英文版的.在这里我不打算一一总结书中的内容,书中每章节后面的exercises都很好,非常 ...

  9. [resource-]Python 网页爬虫 & 文本处理 & 科学计算 & 机器学习 & 数据挖掘兵器谱

    reference: http://www.52nlp.cn/python-%e7%bd%91%e9%a1%b5%e7%88%ac%e8%99%ab-%e6%96%87%e6%9c%ac%e5%a4% ...

  10. Java多线程——<三>简单的线程执行:Executor

    一.概述 按照<Java多线程——<一><二>>中所讲,我们要使用线程,目前都是显示的声明Thread,并调用其start()方法.多线程并行,明显我们需要声明多个 ...