linux系统下apache下载安装教程,linux 下安装apache 快速教程

本文提供在RedHat Enterprise Linux Server 5.4环境下安装Apache Web服务器的详细步骤。包括解决apr、apr-util及pcre配置问题,确保Apache安装成功。

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

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

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

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

Red Hat Enterprise Linux Server release 5.4 (Tikanga)

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

$ http://httpd.apache.org/download.cgi

$ gzip -d httpd-NN.tar.gz

$ tar xvf httpd-NN.tar

$ cd httpd-NN

$ ./configure --prefix=PREFIX

$ make install

$ viPREFIX/conf/httpd.conf

$PREFIX/bin/apachectl -k start

NNmust be replaced with the current version number, andPREFIXmust be replaced with the filesystem path under which the server should be installed. IfPREFIXis 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.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值