在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权限以将它绑定在特权端口上。

最新文章

  1. UNITY 移动到指定位置的写法
  2. NYOJ 485
  3. [C#常用代码]类库中读取解决方案web.Config字符串
  4. GCD XOR, ACM/ICPC Dhaka 2013, UVa12716
  5. ArcGIS Engine中的数据访问
  6. C#写的CRC16检验算法
  7. JTS Geometry关系判断和分析
  8. 【英语】Bingo口语笔记(23) - 万圣节系列
  9. POJ 2499 Binary Tree(二叉树,找规律)
  10. windows下 破解 Sublime Text3 和汉化
  11. DoctrineMigrationsBundle
  12. JavaScript总体的介绍【JavaScript介绍、定义函数方式、对象类型、变量类型】
  13. 文本分类学习(三) 特征权重(TF/IDF)和特征提取
  14. 四种方式实现子goroutine与主线程的同步
  15. linux的一些命令,面试经常碰到的
  16. 【ShaderToy】基本操作——旋转
  17. 4.ansible的delegate_to
  18. Spring Boot 项目实战(五)集成 Dubbo
  19. 在Winform开发框架中实现对数据库的加密支持(转)
  20. 简单脱壳教程笔记(2)---手脱UPX壳(1)

热门文章

  1. java泛型操作复习,以及讲解在android中使用的场景
  2. POJ 2975 Nim(普通nim)
  3. MongoDB文档基本操作
  4. 推荐学习c语言的几个开源项目
  5. 【笔记】Loadrunner添加OS类型为Windows的服务器(Win7)
  6. ios中获取当前屏幕尺寸的方法
  7. OC 截取字符串
  8. ural 1073.Square Country(动态规划)
  9. 批量去除office超链接
  10. EF Unit Of Work