ApacheのSSL対応化と環境設定ApacheによるWebサーバ構築(4)(3/4 ページ)

» 2001年04月17日 00時00分 公開
[一志達也TIS株式会社]

mod_ssl+OpenSSLのインストール

 mod_sslもApache-SSLと同じく、mod_sslとOpenSSLを別途入手しなくてはならない。また、mod_sslもバージョンごとに対応するApacheのバージョンが限定されるから、入手する際はバージョンの整合性に注意してほしい。

必要なファイル(ソース)の入手

関連サイト:
http://www.apache.org/(Apacheオフィシャルサイト)
http://www.modssl.org/ (mod_sslオフィシャルサイト)
http://www.openssl.org/ (OpenSSLオフィシャルサイト)


 Apache-SSLと同様、インストールには

  • Perl5(perl -vで確認可能)

が必要だ。

インストール手順

 はじめに、OpenSSLのコンパイルを行う。これは一般ユーザーでも行える。tarで圧縮ファイルを展開し、作成されたディレクトリでconfig以下のコマンドを実行する。configコマンドを実行する前に、INSTALLおよびREADMEファイルを参照しておいてほしい。

$ tar -zxvf openssl-0.9.6.tar.gz
$ cd openssl-0.9.6
$ ./config
$ make
$ make test

 準備ができたらsuでrootになり、make installでインストールする。

$ su
# make install

 次にApacheの展開とmod_sslのコンパイルを行う。

$ tar -zxvf apache_1.3.19.tar.gz
$ tar -zxvf mod_ssl-2.8.2-1.3.19.tar.gz
$ cd mod_ssl-2.8.2-1.3.19

 configureを行う際は、Apache本体が展開されたディレクトリと、OpenSSLのインストールディレクトリを以下のように指定する。

$ ./configure --with-apache=../apache_1.3.19 
--with-ssl=/usr/local/ssl --enable-rule=SHARED_CORE --with-layout=Apache 
--enable-module=so --enable-module=status --enable-module=info --enable-module=rewrite 
--enable-module=usertrack

 mod_sslとApache本体のコンパイル設定は上記のconfigureで完了するので、次はmakeだ。configureが行われていることは、config.statusファイルで確認できる。

$ cd ../apache_1.3.19
$ make

 makeが終わったら、rootになってmake installする。

$ su
# make install

 以下のメッセージが表示されれば成功である。

+--------------------------------------------------------+
| You now have successfully built and installed the      |
| Apache 1.3 HTTP server. To verify that Apache actually |
| works correctly you now should first check the         |
| (initially created or preserved) configuration files   |
|                                                        |
|   /usr/local/apache/conf/httpd.conf
|                                                        |
| and then you should be able to immediately fire up     |
| Apache the first time by running:                      |
|                                                        |
|   /usr/local/apache/bin/apachectl start
|                                                        |
| Or when you want to run it with SSL enabled use:       |
|                                                        |
|   /usr/local/apache/bin/apachectl startssl
|                                                        |
| Thanks for using Apache.       The 
Apache Group        |
|                                http://www.apache.org/  |
+--------------------------------------------------------+

Copyright © ITmedia, Inc. All Rights Reserved.

RSSについて

アイティメディアIDについて

メールマガジン登録

@ITのメールマガジンは、 もちろん、すべて無料です。ぜひメールマガジンをご購読ください。