引自: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. Oracle bbed使用说明1

    一.centos上编译安装BBED工具 [orasrv@localhost ~]$ cd $ORACLE_HOME/rdbms/lib [orasrv@localhost ~]$ make -f in ...

  2. linux c 实现大数相乘

      #include <stdio.h> #include <string.h> #include <math.h> #include <stdbool.h& ...

  3. 从零开始学ios开发(七):Delegate,Action Sheet, Alert

    Action Sheet和Alert是2种特殊的控件(暂且称之为控件吧,其实不是控件真正的控件,而是ios中的2个类,这2个类定义了2种不同类型的用于和用户交互的弹出框),Action Sheet是从 ...

  4. Jquery post 传递数组给asp.net mvc方法

    以批量删除数据为例  做批量删除会需要传递要删除的数据ID数组 function RemoveLog(){ var postModel=[]; //遍历复选框获取要删除的数据ID 存放到数组中  $( ...

  5. matlab实现复合梯形法则

    复合梯形法则: function int_f = CompoundEchelon( f, a, b, m ) % input : f : function handler % a : the lowe ...

  6. WPF TextBox 的 EventTrigger & 重写控件

    遇到一个需求,在textbox获得焦点的时候,调用一个外部的软键盘. 这可以用两个不同的方法来达到目的. 1.EventTrigger 首先定义一个Style <Style x:Key=&quo ...

  7. Asp.Net生命周期系列二

    在上回书开始的时候我们提到博客园的IIS看了一眼我的请求后就直接交给ASP.NET去处理了,并且要求ASP.NET处理完之后返回HTML以供展示. 那么我们不仅要问: 1,    IIS肯定是没有眼睛 ...

  8. 虚拟机备份转移后,网络启动异常,提示“SIOCSIFADDR: No such device”的解决方案

    虚拟机管理软件:Oracle VirturalBox Manager 4.0.8 虚拟机:Ubuntu Server 10.10 i386 The problem lies in the fact t ...

  9. 【BZOJ】【3295】【CQOI2011】动态逆序对

    树套树 Orz zyf神犇 时光倒流……逆序处理,将删点改为加点,动态维护序列. 由于是动态,要加点,所以用树状数组:同时又需要求序列中求比当前元素大/小的元素个数,所以要用平衡树. 所以方法就是在树 ...

  10. Matlab找二维数组最大值

    1.m先max(x)求出每列最大值,返回行向量,再max对行向量求出最大值,就是max(max(x)). 注意:max(x),不管x是行列向量,只要是向量,那么就返回一个值. 2.先x(:)转为按列的 ...