新しいRHELでApacheをインストールする

新しい環境が使えるようになりました。クラウド上のRHEL仮想環境です。ベンダ様にはApacheの最新入れといてねとリクエストしたんですが、パッケージのやたら古いのしか用意してくれなかったので自力でインストール。
クラッチの環境から作成すると、いろいろありますね。

apr,apr-utilがない

Apache2.4.3のソースを展開してconfigure。apr,apr-utilがないって怒れれます。

-bash-4.1$ ./configure --enable-so
checking for chosen layout... Apache
checking for working mkdir -p... yes
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
configure: 
configure: Configuring Apache Portable Runtime library...
configure: 
checking for APR... no
configure: error: APR not found.  Please read the documentation.

apacheのウェブからapr,apr-utilをダウンロードして適当なところへ展開して、httpd以下のsrclib以下へリンクを作る。

-bash-4.1$ pwd
/home/hoge/httpd/httpd-2.4.3
-bash-4.1$ cd srclib/
-bash-4.1$ tar -jxvf /tmp/apr-1.4.6.tar.bz2 
-bash-4.1$ tar -jxvf /tmp/apr-util-1.5.1.tar.bz2 
-bash-4.1$ ln -s apr-1.4.6 ./apr
-bash-4.1$ ln -s apr-util-1.5.1 ./apr-util

pcre-configがない

再度configureをかけると今度はpcre-configがないとか。

checking for gcc option to accept ISO C99... -std=gnu99
checking for pcre-config... false
configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/

yumでpcre-develを入れます。

# yum -y install pcre-devel
Loaded plugins: product-id, rhnplugin, security, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package pcre-devel.x86_64 0:7.8-4.el6 will be installed
--> Finished Dependency Resolution
(後略)

# which pcre-config
/usr/bin/pcre-config

これでconfigure,makeできました。いまの環境はもう四年もつかっているので、同じようにするにはちょっと時間がかかりそうです。