您的位置:首页 > 运维架构 > Apache

apache安装

2015-10-30 13:28 501 查看
一、apr、apr-util、httpd的关系

(APR(Apache portable Run-time libraries,Apache可移植运行库)的目的如其名称一样,主要为上层的应用程序提供一个可以跨越多操作系统平台使用的底层支持接口库。)

apr
和apr-util 这两个软件是对后端服务软件进行优化的。因为apache作为前端web服务器软件,如果要整合一些后端的web服务器软件的话,如tomcat ,就要用到这两个软件了。

这两个软件系统是自带的,也可以下载源码包安装。

都市要编译进apache里面去的,以模块的形式。

二、下载和安装

(1)#下载http://apr.apache.org/download.cgi

# 编译和安装 apr 1.2

cd srclib/apr

./configure --prefix=/usr/local/apr-httpd/

make

make install

(2)# 编译和安装 apr-util 1.2

cd ../apr-util

./configure --prefix=/usr/local/apr-util-httpd/ --with-apr=/usr/local/apr-httpd/

make

make install

(3)#下载http://httpd.apache.org/download.cgi

# 配置 httpd

cd ../../

./configure --with-apr=/usr/local/apr-httpd/ --with-apr-util=/usr/local/apr-util-httpd/

三、启动服务

启动Apache服务:

# /usr/local/apache2/bin/apachectl start

用浏览器查看http://localhost/,得到It works!

说明apache已经配置成功了。

参考:http://blog.163.com/hlz_2599/blog/static/14237847420134131062360/

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: