最近自学linux,看鸟哥的文章。提到了apache,所以在虚拟机redhat 5下安装了一把,

结合国内外文章写下快速可行的教程:

-------------------------------------------------------------------------------

系统版本: # cat /etc/redhat-release

Red Hat Enterprise Linux Server release 5.4 (Tikanga)

一 步骤概览:(摘自apache官网)

Download $ http://httpd.apache.org/download.cgi
Extract $ gzip -d httpd-NN.tar.gz
$ tar xvf httpd-NN.tar
$ cd httpd-NN
Configure $ ./configure --prefix=PREFIX
Compile $ make
Install $ make install
Customize $ vi PREFIX/conf/httpd.conf
Test PREFIX/bin/apachectl -k start

NN must be replaced with the current version number, and PREFIX must be replaced with the filesystem path under which the server should be installed. If PREFIX is not specified, it defaults to /usr/local/apache2.

--NN 代表版本号,PREFIX指定安装路径,不指定的话默认:/usr/local/apache2.

二、系统要求:(不满足后续安装会提示错误)

APR and APR-Util

Perl-Compatible Regular Expressions Library (PCRE)

三、安装步骤:(满足系统要求)

1.解决apr not found问题

[root@yahootest]# tar -zxf apr-1.4.5.tar.gz

[root@yahoo apr-1.4.5]#./configure --prefix=/usr/local/apr

[root@yahoo apr-1.4.5]#make

[root@yahoo apr-1.4.5]#make install

2.解决APR-util not found问题

[root@yahoo test]# tar -zxfapr-util-1.3.12.tar.gz

[root@yahooapr-util-1.3.12]# ./configure --prefix=/usr/local/apr-util-with-apr=/usr/local/apr/bin/apr-1-config

[root@yahoo apr-util-1.3.12]# make
  [root@yahoo apr-util-1.3.12]# make install

3  ../configure仍提示APR-util notfound,增加--with-apr=/usr/local/apr--with-apr-util=/usr/local/apr-util后出现

configure: error: pcre-config for libpcre not found. PCRE isrequired 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

4.编译Apache

[root@yahoo httpd-2.3.12-beta]# ./configure--prefix=/usr/local/apache2 --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util

--with-pcre=/usr/local/pcre/

[root@yahoo httpd-2.3.12-beta]# make
  [root@yahoo httpd-2.3.12-beta]# make install

[root@yahoo httpd-2.3.12-beta]# /usr/local/apache2/bin/apachectlstart

----------------------------

present  by   dylan.

linux 下安装apache 快速教程的更多相关文章

  1. linux下安装apache详解

    下载httpd-2.2.6.tar.bz2  把httpd-2.2.6.tar.bz2放到/soft 下[root@localhost ~]#cd /soft[root@localhost soft] ...

  2. Linux下安装Apache并以mod_wsgi方式部署django站点

    源码编译方式安装Apache 首先下载Apache源码压缩包,地址为http://mirror.bit.edu.cn/apache/httpd/ 继续下载apr和apr-util压缩包,地址为http ...

  3. linux下安装apache环境

    Centos6.5  64位下安装apache php mysql(安装包版本一定要正确,网上很多都不准,不要用32位的安装包装再64位上,后期有很多问题,下载安装后一定要检出版本,有的网友操蛋,把3 ...

  4. linux下安装apache与php;Apache+PHP+MySQL配置攻略

    1.apache   在如下页面下载apache的for Linux 的源码包    http://www.apache.org/dist/httpd/;   存至/home/xx目录,xx是自建文件 ...

  5. Linux下安装APache

    1:在图形界面下下载apache 安装包,我下的是 httpd-2.2.9.tar.gz 源码安装包,地址是http://httpd.apache.org/download.cgi 2:用:gzip ...

  6. linux下安装Apache(https) 服务器证书安装配置指南

    一.  安装准备 1.    安装Openssl 要使Apache支持SSL,需要首先安装Openssl支持.推荐下载安装openssl-0.9.8k.tar.gz   下载Openssl:http: ...

  7. linux下安装apache(httpd-2.4.3版本)各种坑

    博主的linux是ubuntu 14.04.3. 在安装apache最新版httpd-2.4.3的时候遇到各种坑. 先提供安装apache httpd-2.4.3所需要的包,博主已经整理好,下载地址: ...

  8. linux下安装apache与php

    http://www.92csz.com/study/linux/16.htm 1.apache 在如下页面下载apache的for Linux 的源码包 http://www.apache.org/ ...

  9. linux下安装apache和php和mysql

    我的系统环境时ubuntu 18.04.3,为了ROS: 首先:安装下面一堆软件包: sudo apt install nginx nginx-doc fcgiwrap sudo apt instal ...

随机推荐

  1. ListView 使用

    1. 不使用xml 文件 动态创建 Listview 并且绑定 ArrayList ListView listView = new ListView(this); listView.setAdapte ...

  2. Linux中 干掉原来的PHP方法

    干掉原来的PHP方法: 查看php版本命令:#php -v这个命令是删除不干净的#yum remove php因为使用这个命令以后再用#php -v还是会看到有版本信息的..... 必须强制删除#rp ...

  3. 庖丁解牛-----Live555源码彻底解密(RTP打包)

    本文主要讲解live555的服务端RTP打包流程,根据MediaServer讲解RTP的打包流程,所以大家看这篇文章时,先看看下面这个链接的内容; 庖丁解牛-----Live555源码彻底解密(根据M ...

  4. 【转】Linux 之 /etc/profile、~/.bash_profile 等几个文件的执行过程

    原文网址:http://blog.csdn.net/ithomer/article/details/6322892 在登录Linux时要执行文件的过程如下:在刚登录Linux时,首先启动 /etc/p ...

  5. IP网络5种基本寻址方式 (单播、多播、广播、任播、地域多播)

    Addressing methods The Internet Protocol and other network addressing systems recognize five main ad ...

  6. Oracle 数据乱码

    原文 Oracle 数据乱码 服务器配置环境变量 NLS_LANG:American_america.ZHS16GBK        

  7. Winform之SpreadSheetGear转DevExpress.XtraSpreadsheet.v13.2 z

    DevExpress.XtraSpreadsheet.v13.2 允许用户创建.管理.打印.转换spreadsheet文件而不需要用户安装Office. 什么是Spreadsheet 可以看到最后就是 ...

  8. 15、自定义Content Provider

     自定义Content Provider的步骤    1. 编写一个类,该类必须继承自ContentProvider类. 实现ContentProvider类中所有的抽象方法. 定义Content ...

  9. LightOJ 1427 -Repository(ac自动机)

    题意: 求每个模式串在母串中出现的次数 #include <map> #include <set> #include <list> #include <cma ...

  10. IOS PUSH

    第一阶段:.net应用程序把要发送的消息.目的iPhone的标识打包,发给APNS. 第二阶段:APNS在自身的已注册Push服务的iPhone列表中,查找有相应标识的iPhone,并把消息发到iPh ...