Apache遇到的问题:APR not found
#./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
转载于:https://www.cnblogs.com/JemBai/archive/2012/11/07/2759139.html
Apache遇到的问题:APR not found相关推荐
- apache安装错误error: APR notfound解决办法
apache安装错误error: APR notfound解决办法 linux安装时安装种类不同,一些组件包可能不会被安装,导致linux下安装软件的时候缺这个缺那个,今天为大家介绍linux安装ap ...
- Linux解决编译Apache出现的问题:configure: error: APR not found
问题 #./configure --prefix--检查编辑环境时出现: checking for APR... no configure: error: APR not found . Please ...
- apache apr介绍
APR(Apache portable Run-time libraries,Apache可移植运行库)的目的如其名称一样,主要为上层的应用程序提供一个可以跨越多操作系统平台使用的底层支持接口库.在早 ...
- APR(Apache Portable Run-time Librarie)介绍
Apache Portable Run-time Librarie 在早期的Apache版本中,应用程序本身必须能够处理各种具体操作系统平台的细节,并针对不同的平台调用不同的处理函数.随着Apache ...
- Apache APR可移植运行库简介1-4
转载请注明来源:http://blog.csdn.net/tingya 1.1 何为APR? APR(Apache portable Run-time libraries,Apache可移植运行库)的 ...
- apache+tomcat 搭建负载均衡系统
apache+tomcat+mod_jk 搭建负载均衡系统. 0.os系统采用centos6.8 x64 2.6.32-642.el6.x86_64 1.首先安装好jdk环境本次采用jdk-8u111 ...
- centos7 安装apache+php+memcache
安装apache yum install pcre-devel apr apr-devel apr-util apr-util-devel gcc-c++ libxml2-devel libxml2 ...
- CentOS 为Tomcat安装系统级Apr
为什么80%的码农都做不了架构师?>>> 安装依赖库 因为apr模式本质是使用JNI技术调用操作系统IO接口,需要用到相关API的头文件 yum install apr-dev ...
- apache 安装与配置详细教程
Linux Apache web服务器 学习要点: 1.apache用途,工作模式,httpd.conf的配置重要参数 2.虚拟主机 3. 工作模式的参数优化 Apache 概述: Apache是世界 ...
- apache+svn
Svn+apache部署文档 一.需要的软件包: apr:apr-1.3.18 apr-util-1.3.19 apache:httpd-2.2.14 svn:subversion-1.6.17.t ...
最新文章
- c语言程序设计上机考试占多少分,C语言程序设计上机考试题目汇编.doc
- 如何使用puttygen生成密钥
- android 技能标签功能_android开发工程师必备技能
- python代码转成java_如何实现Java代码转换成python代码
- Linux/Unix系统编程手册 第三章:系统编程概念
- 迷宫搜索问题最短路_迷宫的最短路问题(水+BFS宽搜)
- mysql存储引擎innodb_MySQL常用存储引擎之Innodb
- 《Visual Studio.NET Tips and Tricks》第一章的翻译
- Flask笔记-使用flask-sqlacodegen自动生成model
- 那些公司用计算机仪表电缆,计算机及仪表用电缆技术
- MangoTrainingCourse课程hands-on lab-1
- 手把手玩转win8开发系列课程(22)
- Stream进阶篇-消费组实现验证
- 处理一份内心煎熬的工作有两种方法——只有一种是正确的
- halcon与C#混合编程进阶版
- GitHub 上 1.3k Star 的 strman-java 项目有值得学习的地方吗?源码视觉来分析一波
- C++友元和运算符重载
- 什么是现金流游戏?_富爸爸_新浪博客
- 电动机的故障听声音就可以判断
- Pushlet和Dwr的简单服务器推技术
热门文章
- html5引入spring标签,[MVC]5 使用Spring标签库
- matlab程序eX2_2是什么意思,第2章 MATLAB程序设计
- maven只打包java目录_ssm项目中maven对resources目录打包的路径_默认路径,自定义路径...
- matlab中的数值计算,MATLAB数值计算(中译本,最新修订)
- java swing计算机_使用java swing仿window7标准计算器界面
- linux搭建markdown服务,Markdown新手快速入门基础教程及Ubuntu下的安装
- java椭圆按钮_JAVA按钮重载如何实现椭圆按钮
- Nginx热部署详解
- python累加求和_李老师带你学Python-第二课 如何编写Python程序
- python常见的数据类型_Python中常见的数据类型总结