スポンサーリンク

【Apache】2.4.2 インストール 手順 Fedora CentOS ソース コンパイル

Fedora16 での手順ですが、他 CentOS などでもほぼ同じだと思います。
Apache 2.4 では 2.2 と少しインストールが変わりました。
ポイントは
apr-util
apr
が必要になりました。あとは 2.2 と変わりません。

本家より最新のソースを取得します。
http://httpd.apache.org/

2012年 5月 13日 現在の最新 手順

wget http://ftp.riken.jp/net/apache//httpd/httpd-2.4.2.tar.gz
tar zxvf httpd-2.4.2.tar.gz
cd httpd-2.4.2
cd srclib
上記のソースには、apr と apr-util が含まれませんので、インストールされていない場合は、ソースに含め一緒にコンパイルします。

wget http://ftp.jaist.ac.jp/pub/apache//apr/apr-1.4.6.tar.gz
wget http://ftp.kddilabs.jp/infosystems/apache//apr/apr-util-1.4.1.tar.gz

tar zxvf apr-1.4.6.tar.gz
tar zxvf apr-util-1.4.1.tar.gz

mv apr-1.4.6 apr
mv apr-util-1.4.1 apr-util

cd ../

./configure --prefix=/usr/local/httpd-2.4.2 --enable-so --enable-rewrite --enable-cache --enable-disk-cache --enable-mem-cache --enable-deflate --enable-proxy --enable-proxy-balancer

自分の環境では下記のエラーが発生したため、 pcre-devel をインストールしました。

■ configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/

yum install pcre-devel

■ checking for zlib location... not found
checking whether to enable mod_deflate... configure: error: mod_deflate has been requested but can not be built due to prerequisite failures

yum install zlib-devel.x86.64

make

make install

/usr/local/httpd-2.4.2/bin/apachectl start

 

 

タイトルとURLをコピーしました