引自:http://blog.chinaunix.net/uid-28458801-id-4211258.html


error1:出现以下错误时候,需要下载安装apr

configure: error: APR not found.  Please read the documentation.

apr下载地址:http://apr.apache.org/download.cgi


前言:

linux下,默认安装软件,在开发过程中会经常不知道到什么路径下找到所需的程序,因此手动安装程序对后续的使用会提供非常大的便利。在此,以安装apache为例。

一,准备
    1,安装 apr
        下载地址:http://apr.apache.org/download.cgi

[root@ubuntu:/work/soft/apache]# tar jxvf apr-1.5.0.tar.bz2

[root@@ubuntu:/work/soft/apache/apr-1.5.0]# ./configure --prefix=/work/installed/apr

[root@@ubuntu:/work/soft/apache/apr-1.5.0]# make

[root@@ubuntu:/work/soft/apache/apr-1.5.0]# make install

2,安装 apr-util
        下载地址:http://apr.apache.org/download.cgi
            [root@ubuntu:/work/soft/apache]# tar jxvf  apr-util-1.5.3.tar.bz2

[root@@ubuntu:/work/soft/apache/apr-util-1.5.3]# ./configure --prefix=/work/installed/apr-util --with-apr=/work/installed/apr

[root@@ubuntu:/work/soft/apache/apr-util-1.5.3]# make

[root@@ubuntu:/work/soft/apache/apr-util-1.5.3]# make install

3,安装 pcre
        下载地址:http://pcre.org/
            [root@ubuntu:/work/soft/apache]# tar jxvf  pcre-8.35.tar.bz2

[root@@ubuntu:/work/soft/apache/pcre-8.35]# ./configure --prefix=/work/installed/pcre

[root@@ubuntu:/work/soft/apache/pcre-8.35]# make

[root@@ubuntu:/work/soft/apache/pcre-8.35]# make install

注意:如果在安装 pcre 时,遇到问题:configure: error: You need a C++ compiler for C++ support.
        解决方法:sudo apt-get install build-essential

二,安装apache
        下载地址:http://httpd.apache.org/
            [root@ubuntu:/work/soft/apache]# tar jxvf  httpd-2.4.9.tar.bz2

[root@@ubuntu:/work/soft/apache/httpd-2.4.9]#  ./configure --prefix=/work/installed/apache --with-apr=/work/installed/apr --with-apr-util=/work/installed/apr-util --with-pcre=/work/installed/pcre

[root@@ubuntu:/work/soft/apache/httpd-2.4.9]# make

[root@@ubuntu:/work/soft/apache/httpd-2.4.9]# make install

三,配置
        1,修改配置文件
            否则会出现问题:
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
            解决方法:
            [root@ubuntu:/work/installed/apache]# sudo gedit conf/httpd.conf
            把:
                # ServerName www.example.com:80
            改为:
                ServerName localhost:80

2,启动
            [root@ubuntu:/work/installed/apache]# ./bin/apachectl start

3,开机启动
            打开文件:/etc/rc.local
            [root@ubuntu:/]# sudo gedit /etc/rc.local

添加:/work/installed/apache/bin/apachectl start

linux下手动安装apache详解的更多相关文章

  1. 在linux下手动安装 apache, php, mysql--终极版

    在linux下手动安装 apache, php, mysql: 参考: http://www.cnblogs.com/lufangtao/archive/2012/12/30/2839679.html ...

  2. Linux下Mysql安装教程详解

    Linux下软件安装一般有三种方式:RPM包方式(通过Redhat 第三方包管理系统).二进制包和源码包.本篇主要介绍二进制包安装mysql数据库的方式. 如何获取二进制源码包 当然是到mysql官网 ...

  3. Linux GRUB手动安装方法详解

    需要手工安装 GRUB 主要有两种情况: Linux 系统原先不是使用 GRUB 作为引导程序而现在想要使用 GRUB 来作为引导程序: MBR 中的引导程序被覆盖,需要在 MBR 中重新安装 GRU ...

  4. Linux下OpenSSL 安装图文详解

    安装环境:        操作系统:CentOs6.3 OpenSSL Version:openssl-1.0.0e.tar.gz 目前版本最新的SSL地址为http://www.openssl.or ...

  5. Linux下DNS服务器搭建详解

    Linux下DNS服务器搭建详解 DNS  即Domain Name System(域名系统)的缩写,它是一种将ip地址转换成对应的主机名或将主机名转换成与之相对应ip地址的一种机制.其中通过域名解析 ...

  6. linux PHP 编译安装参数详解

    linux PHP 编译安装参数详解 ./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc -- ...

  7. Linux下编译安装Apache Http Server

    Linux下编译安装Apache Http Server [TOC] 1.下载httpd-2.4.12.tar.bz2 wget http://mirror.bit.edu.cn/apache/htt ...

  8. windows下手动安装 Apache+php+mysql

    PHP 为什么先说php,因为apache的配置要写入php的一些路径 http://php.net/downloads.php  选择windows donwload 选择Thread Safe的版 ...

  9. Linux下的文件目录结构详解

    Linux下的文件目录结构详解 / Linux文件系统的上层根目录 /bin 存放用户可执行的程序 /boot 操作系统启动时所需要的文件 /dev 接口设备文件目录,例如:had表示硬盘 /etc ...

随机推荐

  1. 11g RAC R2 之Linux DNS 配置

    在动手配置前,最好先了解下DNS的理论,以免犯不必要的错误.这都是被坑后的觉悟 -_-!!! Oracle 11g RAC 集群中引入了SCAN(SingleClientAccessName)的概念, ...

  2. SQL Server 数据库身份认证以及包含数据库

    首先分为SQL Server 认证与Windows 身份认证. SQL Server 认证可以运行以下语句来查询 select * from sys.sql_logins 管理员可以直接修改密码,但无 ...

  3. GIS论文翻译问题

    1 在sci库中输入关键词,搜索一篇相关的英文。看看专业词汇怎么翻译。做个记录 2打开ArcGIS中文online和英文online帮助文档。在中文帮助中搜索中文。找到相应的位置,再切换到英文的版本中 ...

  4. Arrays.asList方法总结

    import java.util.Arrays; import java.util.List; /** * * 本类演示了Arrays类中的asList方法 * 通过四个段落来演示,体现出了该方法的相 ...

  5. Oracle收缩表空间

    可以使用 alter database datafile 'file path...' resize xM 的命令来缩小数据文件. SELECT 'alter database datafile '' ...

  6. 关闭ios虚拟键盘的几种方法

    在iOS应用开发中,有三类视图对象会打开虚拟键盘,进行输入操作,但如何关闭虚拟键盘,却没有提供自动化的方法.这个需要我们自己去实现.这三类视图对象分别是UITextField,UITextView和U ...

  7. iOS开发中GCD在多线程方面的理解

    GCD为Grand Central Dispatch的缩写. Grand Central Dispatch (GCD)是Apple开发的一个多核编程的较新的解决方法.在Mac OS X 10.6雪豹中 ...

  8. C#调用Python 脚本语言

    1. 安装IronPython http://pan.baidu.com/s/1qW4jNJ2  下载IronPython 2.7 安装下载下来的安装包 2. 创建项目 创建一个C#的Windows窗 ...

  9. int main(int argc,char* argv[]) 简单理解

    (1)第一个int代表整个main函数的返回值,若函数正常执行完毕,返回0,异常返回则是-1 (2)int argc代表命令行参数的总个数,既然是个数,那就是整型的,即:int; (3)char* a ...

  10. 团队项目之Sprint计划会议

    一.我们团队在4月15日进行了冲刺计划会议,会议过程大致如下: 1.总结目前的工作进展,再一次确定所做项目的方向: 2.将之前的调查问卷的结果进行统计,做了需求分析,大致了解了用户的想法: 3.根据初 ...