在linux(CentOS6.5)上安装Apache,要首先确保以下程序事先安装

apr:The mission of the Apache Portable Runtime (APR) project is to create and maintain

software libraries that provide a predictable and consistent interface to underlying

platform-specific implementations.The primary goal is to provide an API to which

software developers may code and be assured of predictable if not identical behaviour

regardless of the platform on which their software is built, relieving them of the need

to code special-case conditions to work around or take advantage of platform-specific

deficiencies or features.

   参考:http://blog.csdn.net/jmshl/article/details/6773731

apr-util

pcre:The Perl Compatible Regular Expressions (PCRE) library is a set of functions that implement

regular expression pattern matching using the same syntax and semantics as Perl 5. PCRE

has its own native API, in addition to a set of POSIX compatible wrapper functions.

    参考:http://www.pcre.org/

安装步骤如下:

1、安装apr

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

tar -zxvf apr-1.5.2.tar.gz

cd apr-1.5.2

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

make

make install

2、安装apr-util

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

tar -zxvf apr-util-1.5.4.tar.gz

cd apr-util-1.5.4

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

make

make install

3、安装pcre

下载:http://sourceforge.net/projects/pcre

unzip -o pcre-8.39.zip

cd pcre-8.39

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

make

make install

4、安装apache

下载:http://httpd.apache.org/download.cgi

tar -zxvf  httpd-2.4.20.tar.gz

cd httpd-2.4.20

./configure  --prefix=/usr/local/apache2.4.20/ --with-apr=/usr/local/apr/ --with-apr-util=/usr/local/apr-util/ --with-pcre=/usr/local/pcre

make

make install

5、配置

vi /usr/local/apache2.4.20/conf/httpd.conf

6、启动、关闭

cd /usr/local/apache2.4.20/bin

./apachectl -k start

./apachectl -k stop

./apachectl -k restart

如果配置文件中Listen定义的是默认的80端口(或1024以下),那么启动Apache将需要root权限以将它绑定在特权端口上。

linux下编译安装apache的更多相关文章

  1. Linux下编译安装Apache Http Server

    Linux下编译安装Apache Http Server [TOC] 1.下载httpd-2.4.12.tar.bz2 wget http://mirror.bit.edu.cn/apache/htt ...

  2. Linux下编译安装Apache及模块

    Apache是时下最流行的Webserver软件之中的一个,支持多平台,可高速搭建web服务,并且稳定可靠.并可通过简单的API扩充.就能够集成PHP/Python等语言解释器. 文章这里解说怎样在l ...

  3. Linux下编译安装Apache 2.4

    Linux一般会自带httpd服务,但是版本一般不是最新,性能也不是最好,生产中建议手动安装官方源码包,安装Apache官方包之前首先要停止之前的httpd服务,停止后也可以卸载之前的版本 准备工作做 ...

  4. Linux下编译安装Apache报APR not found错误的解决办法

    我在编译安装完Nginx.MySQL和PHP(见之前一篇博客:LNMP环境搭建详细教程)之后,进行apache的编译安装: cd /usr/local/src wget http:.tar.gz ta ...

  5. linux中编译安装Apache、PHP、MySQL(上)

    1.简介 在阿里云买了个云服务器,一直没时间折腾.过了近十天了吧,才有时间好好玩玩这个云服务器.自己是做Web开发的,所以我需要的开发环境是LAMP.之前打算是采用yum安装,不过yum安装apach ...

  6. 在linux下手动安装 apache, php, mysql--终极版

    在linux下手动安装 apache, php, mysql: 参考: http://www.cnblogs.com/lufangtao/archive/2012/12/30/2839679.html ...

  7. CentOS 下编译安装Apache

    CentOS 下编译安装Apache 卸载原有的apache 首先从 http://httpd.apache.or 下载apache源码包httpd-2.4.4.tar.gz然后从 http://ap ...

  8. (转)Linux下编译安装log4cxx

    Linux下编译安装log4cxx 一个项目的服务器端在Linux平台下,用到了开源日志库log4cxx,这个库是apache项目的一个子库.功能很不错.下面记录下它的编译和安装过程. log4cxx ...

  9. LINUX下编译安装PHP各种报错大集合

    本文为大家整理汇总了一些linux下编译安装php各种报错大集合 ,感兴趣的同学参考下. nginx1.6.2-mysql5.5.32二进制,php安装报错解决: 123456 [root@clien ...

随机推荐

  1. 数据库及SQL优化

    一.数据库结构的设计 如果不能设计一个合理的数据库模型,不仅会增加客户端和服务器段程序的编程和维护的难度,而且将会影响系统实际运行的性能.所以,在一个系统开始实施之前,完备的数据库模型的设计是必须的. ...

  2. CodeForces 700B Connecting Universities

    统计每一条边的贡献,假设$u$是$v$的父节点,$(u,v)$的贡献为:$v$下面大学个数$f[v]$与$2*k-f[v]$的较小值. #pragma comment(linker, "/S ...

  3. java中字符串的操作

    //创建一个字符数组 char[] charArr = {'a','b','c','d','e','f','g'}; //创建一个字符串 String str = new String(charArr ...

  4. win2008阿里一键环境包mysql老是1067报错

    目前查看并不是染毒导致mysql无法启动,而是在mysql的配置文件中配置了log这个参数,这个参数语义不明确,请您将“--log”更改为general_log_file并添加一行“general_l ...

  5. 【Python】生成器和递归

    l=[1, 2, 3, 4, 5, 6] 如果l求和,毫无疑问可以使用递归,比如可以这样: def sum(l): res = 0 for i in l: if not isinstance(i, l ...

  6. Infix to posfix 自己写stack,没有()

    #include<iostream> #include<string> using namespace std; template<typename Type> s ...

  7. lua 中 IO库

    read函数从当前输入文件读取串,由它的参数控制读取的内容: "*all”             读取整个文件 "*line"            读取下一行 &qu ...

  8. agnentX学习存在疑问?

    在RFC2741中这样定义: 4.3中有如下段落: A general architectural division of labor between master agent and  subage ...

  9. Excel教程(7) - 工程函数

    BESSELI 用途:返回修正 Bessel 函数值,它与用纯虚数参数运算 时的 Bessel 函数值相等. 语法:BESSELI(x,n)     参数:X 为参数值.N 为函数的阶数.如果 n 非 ...

  10. 判断手机电脑微信 js

    if ((navigator.userAgent.match(/(MicroMessenger)/i))) { //微信浏览器 //location.href=""; } else ...