发布于 2014-10-02 04:00:01 | 264 次阅读 | 评论: 0 | 来源: 网友投递

这里有新鲜出炉的精品教程,程序狗速度看过来!

CentOS Linux操作系统

CentOS(Community Enterprise Operating System,中文意思是:社区企业操作系统)是Linux发行版之一,它是来自于Red Hat Enterprise Linux依照开放源代码规定释出的源代码所编译而成。


本文为大家讲解的是centos下编译安装apache的方法,采用yum安装的方法,感兴趣的同学参考下.

1、准备编译环境

  yum -y install gcc make cmake autoconf libtool libevent

  安装apache必须的依赖包

  yum -y install apr-util apr pcre pcre-devel

2、下载软件包

  wget http://mirror.bit.edu.cn/apache//httpd/httpd-2.4.10.tar.gz

  解压软件包:

  tar -xzf httpd-2.4.10.tar.gz

3、编译安装(Apache 版本低于2.X的按照以下步骤操作)

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

  make

  make install

注意的问题:

报错信息 :
configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/    
解决办法:执行yum -y install pcre pcre-devel 即可解决该报错。
报错信息:
     
checking for APR... no
configure: error: APR not found .  Please read the documentation.
解决办法:
  需要下载apr的最新版本的安装文件:
      
  wget http://mirror.atlanticmetro.net/apache//apr/apr-1.4.6.tar.gz 
  wget http://mirror.atlanticmetro.net/apache//apr/apr-util-1.4.1.tar.gz 
  tar xvfz apr-1.4.6.tar.gz 
  tar xvfz apr-util-1.4.1.tar.gz
  mv apr-1.4.6 httpd-2.4.2/srclib/apr (注意此目录为你自己的apache的安装文件的目录)
  mv apr-util-1.4.1 httpd-2.4.2/srclib/apr-uti

 

      执行入下命令,重新进行编译:

   ./configure --prefix=/usr/local/httpd --with-included-apr
  make
  make install


最新网友评论  共有(0)条评论 发布评论 返回顶部

Copyright © 2007-2017 PHPERZ.COM All Rights Reserved   冀ICP备14009818号  版权声明  广告服务