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/util --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

------------------------------------------------------------------------------------------------------------------------------------

来源:http://www.cnblogs.com/yangxia-test/archive/2012/11/09/2762486.html

Apache 源码安装的更多相关文章

  1. apache源码安装 转载

    转载 1.先进入/usr/local/中创建三个文件夹 apr apr-util apache cd /usr/local目录 mkdir apr mkdir apr-util mkdir apach ...

  2. apache源码安装必须依赖的库apr----/etc/ld.so.conf 文件介绍

    Apache所依赖的库,封装了各个系统相关的API等.虽然都是Apache开发的,但是现在最新版本的Apache和APR源码是分开的.要编Apache就必须使用APR. /etc/ld.so.conf ...

  3. Apache源码安装--httpd-2.2.34

    一.下载源码包 二.将源码包移动/usr/src/目录 三.解压源码包,并进入目录:tar -xzvf httpd-2.2.34.tar.gz,cd httpd-2.2.34 四.安装依赖包:yum ...

  4. centos apache源码安装过程记录

    1.下载相关源文件 wget http://mirror.bjtu.edu.cn/apache/httpd/httpd-2.4.18.tar.gzwget http://mirrors.hust.ed ...

  5. win7 php5.5 apache 源码安装 imagick扩展

    最近公司项目有用到php 的imagick,折腾了好长时间才把扩展装上,最主要的就是最新的不一定是最合适的,最开始一直找最新包安装,一直都不成功,经过google了好长时间,终于找到一个有用的,灵机一 ...

  6. apache源码安装

    1.apr和apr-util,下载地址: http://apr.apache.org/download.cgi yum install gcc yum install libtool yum inst ...

  7. linux下源码安装apache服务

    1.搭建静态网站是,我们只需要搭建apache服务即可满足要求. 例如:如果我再客户端游览器输入地址,他会找到192.168.1.100这个服务器,然后根据端口会找到apache服务器.apache他 ...

  8. 烂泥:php5.6源码安装与apache集成

    本文由秀依林枫提供友情赞助,首发于烂泥行天下. apache对php的支持是通过apache的mod_php5模块来支持的,这点与nginx不同.nginx是通过第三方的fastcgi处理器才可以对p ...

  9. 烂泥:源码安装apache

    本文由秀依林枫提供友情赞助,首发于烂泥行天下. 最近要开始学习nagios监控方面的知识了,但是nagios与apache结合的比较紧密,所以本篇文章就先把apache的源码安装学习下. 我们现在分以 ...

随机推荐

  1. 主题模型之潜在语义分析(Latent Semantic Analysis)

    主题模型(Topic Models)是一套试图在大量文档中发现潜在主题结构的机器学习模型,主题模型通过分析文本中的词来发现文档中的主题.主题之间的联系方式和主题的发展.通过主题模型可以使我们组织和总结 ...

  2. shell工具-sed

    sed sed是一种流编辑器,它一次处理一行内容.处理时,把当前处理的行存储在临时缓冲区中,称为“模式空间”,接着用sed命令处理缓冲区中的内容,处理完成后,把缓冲区的内容送往屏幕.接着处理下一行,这 ...

  3. nodes 验证码

    一个常见的需求. 知乎上得讨论:http://www.zhihu.com/question/32156977 node-canvas 在mac上安装有问题,可能是我没有sudo 使用了ccap:挺不错 ...

  4. bootstrap1.3

    <html>   <head>   <meta charset="UTF-8">   <title></title>   ...

  5. [Proposal]Nano-Diary(纳日记)

    [Motivation] 很多人都有记日记的习惯,不为别的,就为了那份情怀.但是也有很多人不记日记,原因是嫌写字麻烦.记得很久很久以前,在<读者>上读过一篇文章,大意是一个人用数值记下每天 ...

  6. Dacapao 实验集(9.12 版本) 能不能给个网址?【内存分析实验】

    网址 Dacapao 实验集 引用 以前看到的文章,如果使用这个基准程序,引用文献很多时候是一篇论文: Blackburn S M, Garner R, Hoffmann C, et al. The ...

  7. StriveEngine-UDP

    文章中的StriveEngine.dll版本为V3.9.0.0,源码下载请到 这里 UDP比TCP通信,就相对简单多了 先上代码,建立2个控制台程序,分别为SEUDP1,SEUDP2,其中SEUDP1 ...

  8. ionic 2.x 3.x input触发调用键盘搜索及事件

    html (1.input  type='search'   2.将input套在一个带action的form中 ) <form action=""> <ion- ...

  9. Python 库,资源

    库名称简介 Chardet字符编码探测器,可以自动检测文本.网页.xml的编码. colorama主要用来给文本添加各种颜色,并且非常简单易用. Prettytable主要用于在终端或浏览器端构建格式 ...

  10. Linux巩固记录(8) Hbase shell 基本使用

    继续前几篇内容,讲解hbase基本使用 1.进入hbase shell: hbase有很多种操作方式,比如shell,java客户端,webUI等,可以直接输入hbase进行提示 [root@mast ...