今日编译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. ASP.NET XmlSerializer权限问题

    今天碰到一个奇怪问题.因为在2台服务器上做文件共享,使服务器A能访问服务器B的共享目录.在IIS上使用虚拟目录实现的话,需要给应用程序池指定一个统一的账号.在调试的时候能够使用,但是一部署到服务器上, ...

  2. jQuery.uploadify-----文件上传带进度条,支持多文件上传的插件

    借鉴别人总结的uploadify:基于jquery的文件上传插件,支持ajax无刷新上传,多个文件同时上传,上传进行进度显示,控制文件上传大小,删除已上传文件. uploadify有两个版本,一个用f ...

  3. jsp还是html+ajax

    1.有人说JSP会泄露源码(可能会有一些代码痕迹,但肯定没啥大事)2.又说,Ajax是为了分离前后台,让控制部分在前台处理,降低代码耦合度,后台只相当于服务. 3.能够让前台移植,降低后期维护成本.纯 ...

  4. c++中STL库简介及使用说明

    作为C++标准不可缺少的一部分,STL应该是渗透在C++程序的角角落落里的.STL不是实验室里的宠儿,也不是程序员桌上的摆设,她的激动人心并非昙花一现.本教程旨在传播和普及STL的基础知识,若能借此机 ...

  5. Alpha版本冲刺现场演示和阶段验收的总结

    一共15个组.有13个组参加了今天的现场演示,分别是YZH.Radio Group.FZU5BOYS.静静看.Clean Code.Mod4.F4.For the Dream.Journey of C ...

  6. 转 为什么文件存储要选用B+树这样的数据结构?

    为什么文件存储要选用B+树这样的数据结构? "文件存储要选用B+树这样的数据结构"--没记错的话,这是严蔚敏那本数据结构书上的一句结论.不知道是我没细看还是她没细讲,反正当时纯粹应 ...

  7. Java文件拷贝

    package com.lxm.demos; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io. ...

  8. ubuntu下nginx的启停等常用命令

    开发过程中,我们会经常的修改nginx的配置文件,每次修改配置文件都可以先测试下本次修改的配置文件是否正确,可以利用以下命令: ? 1 service nginx -t -c /alidata/ser ...

  9. swift项目实战--微博的未登录界面的实现,和监听未登录界面两个按钮的两种实现方法

    1.未登录界面的实现 微博项目中,用户不登录的话,显示的是未登录的界面.项目中TabBarVC的子控制器都是tableViewVC,所以抽取了父类,让父类判断用户是否登录,决定显示什么样的界面.loa ...

  10. java-二维码编写zxing

    zxing 这个是google的 下载地址 http://code.google.com/p/zxing/downloads/list 二维码源码案例 package com.utils; impor ...