一、安装

  安装之前先将服务器的防火墙关掉。

  systemctl  stop  firewalld

  systemctl  disable  firewall

第一步:

  安装apr

    下载:

    wget -c http://mirrors.tuna.tsinghua.edu.cn/apache//apr/apr-1.6.3.tar.bz2

    解压该文件:

    tar -jvxf apr-1.6.3.tar.bz2
    检测:

    cd apr-1.6.3
    ./configure --prefix=/usr/local/apr/
    编译:

    make
    make install

第二步:

  安装apr-util

    下载:

    wget -c http://mirrors.tuna.tsinghua.edu.cn/apache//apr/apr-util-1.6.1.tar.bz2

    解压该文件:
    tar -jvxf apr-util-1.6.1.tar.bz2

    检测:
    cd apr-util-1.6.3
    ./configure --prefix=/usr/local/apr-util/ --with-apr=/usr/local/apr/

    编译:
    make
    make install

第三步:

  安装pcre

    下载:

    wget -c http://ftp.pcre.org/pub/pcre/pcre-8.42.tar.bz2

    解压该文件:
    tar -jvxf pcre-8.42.tar.bz2

    检测:
    cd pcre-8.42
    ./configure --prefix=/usr/local/pcre/

    编译:
    make
    make install

第四步:
  安装httpd

    下载:

    wget -c http://mirrors.cnnic.cn/apache/httpd/httpd-2.4.29.tar.bz2

    解压该文件:
    tar -jvxf httpd-2.4.29.tar.bz2

    检测:
    cd httpd-2.4.29
    ./configure --prefix=/usr/local/httpd/ --with-apr=/usr/local/apr/ --with-apr-util=/usr/local/apr-util/ --with-pcre=/usr/local/pcre/

    编译:
    make
    make install

第五步:

  配置/usr/local/apache2/conf/httpd.conf

      ServerName www.examda.com:80
      改为
      ServerName localhost:80

第六步:

  启动apache服务

    /usr/local/apache2/bin/apachectl start


二、检测

  使用浏览器访问本地IP

  出现It works!成功


三、报错处理

  (1)configure: error: APR not found. Please read the documentation.

    这是没有安装apr或者apr安装失败导致的,重新安装apr。

      安装请查看第一步。

  (2)configure: error: APR-util not found. Please read the documentation.

    这是没有安装apr-util或者apr-util安装失败导致的,重新安装apr-util。

      安装请查看第二步。

  (3)configure: error: no acceptable C compiler found in $PATH

    这是没有安装gcc编译器或者gcc编译器安装失败导致的,重新安装gcc。

      yum  install  -y  gcc

  (4)xml/apr_xml.c:35:19: 致命错误:expat.h:没有那个文件或目录

    这是没有安装expat-devel或者expat-devel安装失败导致的,重新安装expat-devel。

      yum  install  -y  expat-devel

  (5)configure: error: Invalid C++ compiler or C++ compiler flags

    这是没有安装gcc-c++或者gcc-c++安装失败导致的,重新安装gcc-c++

      yum  install  -y  gcc-c++

  (6)configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/

    这是没有安装pcre或者pcre安装失败导致的,重新安装pcre。

      安装请查看第三步。

最新文章

  1. [转]CentOS-6.3安装配置cmake
  2. POJ1201 Intervals
  3. ESXi云管理平台
  4. ajax 、ajax的交互模型、如何解决跨域问题
  5. 2D游戏编程5—锁定频率
  6. ios背景更新和下载
  7. 理解git分支-远程分支
  8. iOS强制切换横屏、竖屏
  9. Python基础:十一、流程控制(if语句、while循环)
  10. 学习测试框架Mocha
  11. Haskell语言学习笔记(34)System.Environment
  12. maven中net.sf.json报错的解决方法
  13. Codeforces Round #335 (Div. 2) D. Lazy Student 贪心+构造
  14. Linux命令非常全
  15. U盘安装XP
  16. Java-Runoob-高级教程:Java MySQL 连接
  17. Spring学习--切面优先级及重用切点表达式
  18. django事物回滚
  19. linux sublime python
  20. Vagrant Tip: Virtualbox Guest Additions

热门文章

  1. web应用和http协议
  2. vue loading组件
  3. RDMA in CloudComputing
  4. git push & git pull 推送/拉取分支
  5. cobbler自动安装
  6. git相关操作(githug)
  7. bootstrap table通过ajax获取后台数据展示在table
  8. 用C#生成不反复的随机数
  9. POJ 3694 无向图的桥
  10. Codeforces 385C 线性筛素数