热门标签 | HotTags
当前位置:  开发笔记 > 前端 > 正文

Apache遇到的问题APRnotfound问题的解决方法

checkingforAPRnoconfigure:error:APRnotfound.Pleasereadthedocumentation

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

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

可以用./configure –help | grep apr 查看帮助。 --with-included-apr     Use bundled copies of APR/APR-Util --with-apr=PATH         prefix for installed APR or the full path to apr-config --with-apr-util=PATH    prefix for installed APU or the full path to 安装APR(Apache Portable Runtime ) 下载:http://apr.apache.org/download.cgi

#cd /tmp/52lamp/ //源码存放位置 #tar -zxvf apr-1.4.2.tar.gz //unzip -o apr-1.4.2.zip #cd apr-1.4.2 #./configure #make #make install

再次检查编译环境出现

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

#./configure –help | grep apr-util --with-apr-util=PATH    prefix for installed APU or the full path to

下载:http://download.chinaunix.net/download/0001000/472.shtml #tar -zxvf apr-util-1.3.9.tar.gz #cd apr-util-1.3.9 #./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr #make #make install

./configure仍提示APR-util not found,增加--with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util后出现 configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/

#./configure –help | grep pcre --with-pcre=PATH        Use external PCRE library

下载:http://sourceforge.net/projects/pcre #unzip -o pcre-8.10.zip #cd pcre-8.10 #./configure --prefix=/usr/local/pcre #make #make install

继续安装Apache/httpd,./configure 时加上参数 --with-apr=/usr/local/apr/ --with-apr-util=/usr/local/apr-util/ --with-pcre=/usr/local/pcre,这个问题就解决了

注意:Apache在安装时不会检查参数是否正确,错误的参数会直接被丢弃,不会报告给用户。但可以使用echo $?命令检查是否有错误,当输出结果为0时表示没有错误。

#echo $? 0

#make #make install

复制Apache启动文件 #cp /usr/local/httpd/bin/apachectl /sbin/

启动Apache #apachectl start

设置Apache开机自启动 #vi /etc/rc.d/rc.local 增加一行 /sbin/apachectl start

或者将httpd服务添加到ntsysv服务管理工具 #apachectl stop //关闭Apache以免不必要的麻烦 #cp /usr/local/httpd/bin/apachectl /etc/rc.d/init.d/httpd #vi /etc/rc.d/init.d/httpd 修改为 #!/bin/sh # #chkconfig: 345 85 15 //#不能省略,注意空格 #description: httpd for 52lamp 20101016 21:54 //任意字符串 # ......

第二行中345的含义: #       0 - operation completed successfully #       1 - #       2 - usage error #       3 - httpd could not be started #       4 - httpd could not be stopped #       5 - httpd could not be started during a restart

修改有关权限 #cd /etc/rc.d/init.d/ #chmod a+x httpd #chkconfig --add httpd

#ntsysv httpd已经在列表中,按F1可以看到刚才编写的服务描述httpd for 52lamp 20101016 21:54。

#apachectl start #ps -e |grep httpd 23247 ?        00:00:00 httpd 23248 ?        00:00:00 httpd 23249 ?        00:00:00 httpd 23251 ?        00:00:00 httpd 23252 ?        00:00:00 httpd

在浏览器中输入127.0.0.1,看起来一切正常;但是局域网内其他电脑不能访问!

#service iptables stop

如果不想关闭防火墙,放开80端口即可。

#vi /etc/sysconfig/iptables 增加一行-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT #service iptables restart //重启防火墙

现在一切OK


推荐阅读
  • 本文介绍如何在Java项目中使用Log4j库进行日志记录。我们将详细说明Log4j库的引入、配置及简单应用,帮助开发者快速上手。 ... [详细]
  • PHP 5.5.0rc1 发布:深入解析 Zend OPcache
    2013年5月9日,PHP官方发布了PHP 5.5.0rc1和PHP 5.4.15正式版,这两个版本均支持64位环境。本文将详细介绍Zend OPcache的功能及其在Windows环境下的配置与测试。 ... [详细]
  • 在 Windows 10 中,F1 至 F12 键默认设置为快捷功能键。本文将介绍几种有效方法来禁用这些快捷键,并恢复其标准功能键的作用。请注意,部分笔记本电脑的快捷键可能无法完全关闭。 ... [详细]
  • 在计算机技术的学习道路上,51CTO学院以其专业性和专注度给我留下了深刻印象。从2012年接触计算机到2014年开始系统学习网络技术和安全领域,51CTO学院始终是我信赖的学习平台。 ... [详细]
  • 本周信息安全小组主要进行了CTF竞赛相关技能的学习,包括HTML和CSS的基础知识、逆向工程的初步探索以及整数溢出漏洞的学习。此外,还掌握了Linux命令行操作及互联网工作原理的基本概念。 ... [详细]
  • 技术分享:从动态网站提取站点密钥的解决方案
    本文探讨了如何从动态网站中提取站点密钥,特别是针对验证码(reCAPTCHA)的处理方法。通过结合Selenium和requests库,提供了详细的代码示例和优化建议。 ... [详细]
  • CSS 布局:液态三栏混合宽度布局
    本文介绍了如何使用 CSS 实现液态的三栏布局,其中各栏具有不同的宽度设置。通过调整容器和内容区域的属性,可以实现灵活且响应式的网页设计。 ... [详细]
  • 本文探讨了如何像程序员一样思考,强调了将复杂问题分解为更小模块的重要性,并讨论了如何通过妥善管理和复用已有代码来提高编程效率。 ... [详细]
  • 本文详细介绍了如何解决Uploadify插件在Internet Explorer(IE)9和10版本中遇到的点击失效及JQuery运行时错误问题。通过修改相关JavaScript代码,确保上传功能在不同浏览器环境中的一致性和稳定性。 ... [详细]
  • 本文介绍了如何利用JavaScript或jQuery来判断网页中的文本框是否处于焦点状态,以及如何检测鼠标是否悬停在指定的HTML元素上。 ... [详细]
  • python的交互模式怎么输出名文汉字[python常见问题]
    在命令行模式下敲命令python,就看到类似如下的一堆文本输出,然后就进入到Python交互模式,它的提示符是>>>,此时我们可以使用print() ... [详细]
  • 火星商店问题:线段树分治与持久化Trie树的应用
    本题涉及编号为1至n的火星商店,每个商店有一个永久商品价值v。操作包括每天在指定商店增加一个新商品,以及查询某段时间内某些商店中所有商品(含永久商品)与给定密码值的最大异或结果。通过线段树分治和持久化Trie树来高效解决此问题。 ... [详细]
  • Java 中的 BigDecimal pow()方法,示例 ... [详细]
  • Linux 系统启动故障排除指南:MBR 和 GRUB 问题
    本文详细介绍了 Linux 系统启动过程中常见的 MBR 扇区和 GRUB 引导程序故障及其解决方案,涵盖从备份、模拟故障到恢复的具体步骤。 ... [详细]
  • This guide provides a comprehensive step-by-step approach to successfully installing the MongoDB PHP driver on XAMPP for macOS, ensuring a smooth and efficient setup process. ... [详细]
author-avatar
超可爱萌地1983
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有