在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. 第三节,入门知识和windows系统安装python环境

    1.使用Linux的好处(稳定)不容易死机,可以长达几年不间断运行(安全)相对windows系统更安全,相对更不容受到各种攻击(开源)免费使用2.安装好虚拟机VMware软件,和Linux系统,以及X ...

  2. UVa 536 Tree Recovery | GOJ 1077 Post-order (习题 6-3)

    传送门1: https://uva.onlinejudge.org/external/5/536.pdf 传送门2: http://acm.gdufe.edu.cn/Problem/read/id/1 ...

  3. Codeforces Round #366 (Div. 2)_C. Thor

    C. Thor time limit per test 2 seconds memory limit per test 256 megabytes input standard input outpu ...

  4. ACM第一天研究懂的AC代码——BFS问题解答——习题zoj2165

    代码参考网址:http://blog.csdn.net/slience_perseverance/article/details/6706354 试题分析: 本题是研究red and black的一个 ...

  5. STORM在线业务实践-集群空闲CPU飙高问题排查

    源:http://daiwa.ninja/index.php/2015/07/18/storm-cpu-overload/ 2015-07-18AUTHORDAIWA STORM在线业务实践-集群空闲 ...

  6. 【FBA】SharePoint 2013自定义Providers在基于表单的身份验证(Forms-Based-Authentication)中的应用

    //http://www.cnblogs.com/OceanEyes/p/custom-provider-in-sharepoint-2013-fba-authentication.html 由于项目 ...

  7. VMware 下的Linux系统远程连接putty

    ifconfig查看ip地址 虚拟网卡需要自己新建  nat8 putty不能显示中文的解决办法 http://jingyan.baidu.com/article/5552ef47df8a97518f ...

  8. 酷比魔方 iwork10 旗舰版

    平板电脑自带的win10的一键恢复不是一般的慢,简直慢出个性了,历经5个小时...必须是个有耐心的人才敢一键恢复,不然强制关机就变砖了...

  9. div盒子水平垂直居中的方法

    这个问题比较老,方法比较多,各有优劣,着情使用. 一.盒子没有固定的宽和高 方案1.Transforms 变形 这是最简单的方法,不仅能实现绝对居中同样的效果,也支持联合可变高度方式使用.内容块定义t ...

  10. 《JavaScript高级程序设计》读书笔记 ---if语句

    if语句 大多数编程语言中最为常用的一个语句就是if 语句.以下是if 语句的语法:if (condition) statement1 else statement2其中的condition(条件)可 ...