apache-2.0.59とOpenSSL-0.9.7j

7月末にapache2.0.59がリリースされていたのでアップデートしたのだが、何気にserver-infoでOpenSSLのバージョンを見たら0.9.7aと出ている。「えらい古いやん」というわけで、OpenSSLの0.9.7jを落してアップデートしたのだが、server-infoでのバージョン表示は相変わらず0.9.7aだ。

元々apacheOpenSSLFedora Core 3のパッケージとして入っていたので、RPMの**ファイルレイアウト(ディレクトリ構成)**がデフォルトとは異なるのがありがちな問題だと思われる。

現状に合わせて指定しなおす事でクリアできると思ったのだが、それだけで終わらず。Fedora Core 3OpenSSLのRPMはShared-Libraryとして構成されていた為に、libssl.aではなくlibssl.soを作らなくてはならなかったというのは盲点だ。

で、最終手順は以下の通り。OpenSSLのビルド手順は

[yano@server openssl-0.9.7j]$ ./config --prefix=`/usr` --openssldir=`/usr/share/ssl` shared
[yano@server openssl-0.9.7j]$ make
[yano@server openssl-0.9.7j]$ make test
[yano@server openssl-0.9.7j]$ sudo make install

となる。OpenSSLを再インストールしてからapacheもconfigretionからやり直し。

[yano@server httpd-2.0.59]$ ./configure --enable-mods-shared=all \
 --enable-ssl=shared --enable-suexec=shared --with-suexec-bin=/usr/local/apache2/bin/suexec \
 --with-suexec-caller=apache --enable-cache=shared --enable-disk-cache=shared \
 --enable-file-cache=shared --enable-mem-cache=shared
[yano@server httpd-2.0.59]$ make
[yano@server httpd-2.0.59]$ sudo make install
[yano@server httpd-2.0.59]$ sudo /sbin/service httpd restart

結局2日間を費やしたのだが、終わってみればいつも「こんなもの」だなぁ。

参照

The Apache HTTP Server Project http://httpd.apache.org/

OpenSSL http://www.openssl.org/