今日编译apache时出错:

#./configure --prefix……检查编辑环境时出现:

checking for APR... no
configure: error: APR not found .  Please read the documentation

解决办法:

1.下载所需软件包:

wget http://archive.apache.org/dist/apr/apr-1.4.5.tar.gz
wget http://archive.apache.org/dist/apr/apr-util-1.3.12.tar.gz
wget http://1120.www.qixoo.qixoo.com/dist/apr/apr-util-1.3.12.tar.gz
wget http://jaist.dl.sourceforge.net/project/pcre/pcre/8.10/pcre-8.10.zip

2.编译安装:

a:解决apr not found问题>>>>>>

[ test]# tar -zxf apr-1.4.5.tar.gz
[ test]# cd  apr-1.4.5
[ apr-1.4.5]# ./configure --prefix=/usr/local/apr
[ apr-1.4.5]# make && make install

b:解决APR-util not found问题>>>>

[ test]# tar -zxf apr-util-1.3.12.tar.gz
[ test]# cd apr-util-1.3.12
[ apr-util-1.3.12]# ./configure --prefix=/usr/local/apr-util -with-apr=/usr/local/apr/bin/apr-1-config
[ apr-util-1.3.12]# make && make install

c:解决pcre问题>>>>>>>>>

[ test]#unzip -o pcre-8.10.zip
[ test]#cd pcre-8.10
[ pcre-8.10]#./configure --prefix=/usr/local/pcre
[ pcre-8.10]#make && make install

3.最后编译Apache时加上:

[ httpd-2.2.31]# ./configure --prefix=/usr/local/httpd --enable-so --enable-cgi --enable-charset-lite --enable-rewrite --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/ --with-pcre=/usr/local/pcre/ && make && make install

安装后输出内容为:

mkdir /usr/local/httpd/build
Installing man pages and online manual
mkdir /usr/local/httpd/man
mkdir /usr/local/httpd/man/man1
mkdir /usr/local/httpd/man/man8
mkdir /usr/local/httpd/manual
make[1]: Leaving directory `/usr/src/httpd-2.2.31‘
[ httpd-2.2.31]#

4.配置服务

[ httpd-2.2.31]# ln -s /usr/local/httpd/bin/apachectl /etc/init.d/httpd
[ httpd-2.2.31]# vim /etc/init.d/httpd
#!/bin/sh
# chkconfig:35 85 15  #添加
# description:描述信息,随便写!#添加
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
略………………
[ httpd-2.2.31]# chmod +x httpd
[ httpd-2.2.31]# chkconfig --level 35 httpd on

5.启动服务

[ httpd-2.2.31]# service  httpd start #警告解决方法,编辑配置文件,将ServerName去掉注释重启服务即可,例如:ServerName 127.0.0.1:80
httpd: Could not reliably determine the server‘s fully qualified domain name, using localhost.localdomain for ServerName
[ httpd-2.2.31]#

6.防火墙设置

[ httpd-2.2.31]# iptables -I INPUT -m multiport -p tcp --dport 80 -j ACCEPT
[ httpd-2.2.31]# service  iptables save
iptables:将防火墙规则保存到 /etc/sysconfig/iptables:     [确定]

王高利:Linux__apache,安装,报错解决的更多相关文章

  1. VMware Virtual Machine安装报错解决1

    安装完VMware virtual machine 后,再进行 "create a new virtual machine"最后点击"Finish"时,报如下错 ...

  2. ORACLE安装报错解决

    今天在虚拟机中安装了一个WINDOWS系统,用于安装oracle服务器:从安装到使用中出现了很多的问题,把这些问题解决掉,花了不少时间,查了不少的资料. 第一个,我在安装过程中,出现了ORA-0092 ...

  3. php扩展AMQP,安装报错解决

    接下来来安装php扩展AMQP,安装了它以后,才能用PHP操作rabbitmq.wget https://pecl.php.net/get/amqp-1.4.0.tgztar -zxvf amqp-1 ...

  4. CitrixSmartAuditor安装报错解决方法

    报错1:安装过程中报错 解决方法: SQLServer的配置: http://www.cnblogs.com/weizhengLoveMayDay/p/3267756.html 报错2:无法连接到Sm ...

  5. ELK系列--justniffer0.5.12安装报错解决方法

    现象: justniffer的0.5.12(安装后显示0.5.13版本)安装过程中需要升级boost至1.46以上版本,同时在make时会出现如下报错: /opt/Python-2.6.6/Pytho ...

  6. 开发工具cfree安装报错解决

    报错如下: [ --------------------配置: mingw5 - CUI Debug, 编译器类型: MinGW-------------------- 检查文件依赖性... 正在编译 ...

  7. PHP-FPM安装报错解决

    PHP源码安装 setenforce 0--------------------------------------------------------------------安装php时的报错che ...

  8. image-webpack-loader包安装报错解决

    在家里安装这个包,总是报错安装失败,换成最快的淘宝镜像也是如此,先卸载重新安装亦是如此,于是想到了原因,到了公司,公司的网是可以连接国外的,安装成功了! 也就是说,需要翻墙才可以装成功.

  9. mysql安装 报错解决

    换了新电脑,重新安装了一下mysql,安装过程出现了一些错误,在此记录一下: 参考菜鸟教程:https://www.runoob.com/mysql/mysql-install.html 1.下载my ...

  10. pip安装报错 解决办法

    安装库时报错:Could not fetch URL https://pypi.python.org/simple/wheel/: 解决办法:  pip --trusted-host pypi.pyt ...

随机推荐

  1. <实训|第十二天>用LVM对linux分区进行动态扩容

    [root@localhost~]#序言在linux中,我们安装软件的途径一般有那些,你们知道吗?在linux中,如果你的磁盘空间不够用了,你知道如何来扩展磁盘吗?动态扩容不仅在工作中还是在其他方面都 ...

  2. WebConfig 详解

    一.Web.Config继承特性 首先我们就来看看配置文件的继承层次.都知道在ASP.NET中有很多的配置文件,如machine.config,web.config,特别是web.config出现在很 ...

  3. java并发:线程同步机制之ThreadLocal

    1.简述ThreadLocal ThreadLocal实例通常作为静态的私有的(private static)字段出现在一个类中,这个类用来关联一个线程.ThreadLocal是一个线程级别的局部变量 ...

  4. MySQL5.6 实现主从复制,读写分离,分散单台服务器压力

    闲来无事,在本地搭建几台虚拟机,准备配一个mysql读写分离的主从配置,版本选用最新版的,mysql.5.6.28 版本,本处使用源码安装(鄙人一向喜欢源码安装,因为centos中鄙人不知道yum安装 ...

  5. Visual Studio 2015初体验——前端开发工作的问题

    前言 因为后台项目开发适用的VS2015,为了跟后台开发配合,前端部门也统一从VS2013升级到了VS2015. 因为C盘空间不足要先卸载,这里就不说卸载2013时花了多长时间,只说安装2015时用了 ...

  6. 【BZOJ1002】【FJOI2007】轮状病毒(生成树计数)

    1002: [FJOI2007]轮状病毒 Time Limit: 1 Sec  Memory Limit: 162 MBSubmit: 1766  Solved: 946[Submit][Status ...

  7. PHP 异常

    <?php /* PHP 异常处理 什么是异常? PHP 5 提供了一种新的面向对象的错误处理方法. 异常处理用于在指定的错误(异常)情况发生时改变脚本的正常流程. 这种情况称为异常. 当异常被 ...

  8. git标签

    git标签 如果你达到一个重要的阶段,并希望永远记住那个特别的提交快照,你可以使用 git tag 给它打上标签.-a 选项意为"创建一个带注解的标签". 添加标签命令: $ gi ...

  9. Learning jQuery, 4th Edition 勘误表

    来源于:http://book.learningjquery.com/3145/errata/ Chapter 1 page 14 The CSS snippet is correct, but it ...

  10. 【BZOJ 1038】【ZJOI 2008】瞭望塔

    http://www.lydsy.com/JudgeOnline/problem.php?id=1038 半平面交裸题,求完半平面后在折线段上的每个点竖直向上和半平面上的每个点竖直向下求距离,统计最小 ...