apache,也就是httpd,是linux中常用的软件。下面我介绍一下亲测的httpd 2.2 版本的安装方法。
1. 下载源码
# cd /usr/local/src/ ##进入下载目录
# wget http://www.lishiming.net/data/attachment/forum/httpd-2.2.24.tar.bz2 ## 64位
#tar -jxvf httpd-2.2.24.tar.bz2
2. 配置编译参数:
为防止后面的erro打断配置过程,可提前安装需要的包:
erro: mod_deflate has been requested but can not be built due to rerequisitefailures(ubuntu centent)
解决办法:yum install zlib-devel -y
# cd ./httpd-2.2.24
./configure \
--prefix=/usr/local/apache2 \ ## 指定的安装目录
--with-included-apr \
--enable-so \
--enable-deflate=shared \
--enable-expires=shared \
--enable-rewrite=shared \
--with-pcre
注:--prefix: 指定安装路径;--enable-so:启动DSO;--enable-deflate=shared:动态共享方式编译deflate模块;
3. 确认无误后,编译和安装:
# make&& make insatall
本文出自 “Liemer_Lius的博客” 博客,请务必保留此出处http://liemerlius.blog.51cto.com/10409683/1696842
原文地址:http://liemerlius.blog.51cto.com/10409683/1696842