apache_1.3.20 のインストール

  1. apache のインストール
  2. 設定ファイルの変更
  3. 注意点

1. apache のインストール

以前インストールされていた apache (ver. 1.3.9) はdebianパッケージになっていた.
しかし debian が potato になり, slink 版では最新版のパッケージはないため, ソースからインストールした.

インストール作業
  1. 最新バージョン apache_1.3.20 を http://httpd.apache.org/ よりダウンロード.
    今回は自分のホームディレクトリにダウンロードした
  2. ホームディレクトリで圧縮ファイルを展開する.
    orange:~$ tar zxvf apache_1.3.20.tar.gz
    (一部抜粋)
    apache_1.3.20/ABOUT_APACHE
    apache_1.3.20/INSTALL
    apache_1.3.20/Makefile.tmpl
    apache_1.3.20/README

    それによって apache_1.3.20 というディレクトリができる.
    以下に展開されたファイルのうち大事そうなものを挙げるので 少し目を通しておくといいだろう.
    • README.configure: 圧縮ファイルの展開から make install までの説明.
    • Makefile.tmpl: Makefile を作るためのテンプレート
    • configure: 環境設定用のシェルスクリプト
    • src: Apache のソース本体の入ったディレクトリ
    • INSTALL: インストールの方法
    • conf: 設定ファイルの元の入ったディレクトリ

  3. apache_1.3.20 のディレクトリに移動して configure する.
    configure スクリプトはシステムの OS や環境を自動的に判別して,
    最適なコンパイル作業を行なえるようにするものである. (Makefileを作る)
    orange:~$ cd apache_1.3.20
    orange:~/apache_1.3.20$ ./configure
    (一部抜粋)
    Configuring for Apache, Version 1.3.20
    + Warning: Configuring Apache with default settings.
    + This is probably not what you really want.
    Creating Makefile

    (*)デフォルトでは /usr/local/apache/ 以下にインストールするようになる.
    インストールしたい場所を指定するには
    orange:~/apache_1.3.20$ ./configure --prefix=[インストールするディレクトリ]
    ※ 今回は、インストールするディレクトリを /etc/apache にした.
    また, 事前にインストールされる場所を知るには
    orange:~/apache_1.3.20$ ./configure --show-layout

  4. make する.
    make コマンドによって実際にコンパイルされる.
    orange:~/apache_1.3.20$ make
    ===> src
    make[1]: Entering directory `/home/hogehoge/apache_1.3.20'
    make[2]: Entering directory `/home/hogehoge/apache_1.3.20/src'
    ===> src/regex
    sh ./mkh -p regcomp.c >regcomp.ih
    gcc -I. -I../os/unix -I../include -DLINUX=2 -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED `../apaci` -DPOSIX_MISTAKE -c regcomp.c -o regcomp.o
    (後略)
  5. make install する.
    適切な場所へインストールされる.
    orange:~/apache_1.3.20# make install
    make[1]: Entering directory `/home/hogehoge/apache_1.3.20'
    ===> [mktree: Creating Apache installation tree]
    ./src/helpers/mkdir.sh /etc/apache/bin
    ./src/helpers/mkdir.sh /etc/apache/bin
    ./src/helpers/mkdir.sh /etc/apache/libexec
    (中略)
    +------------------------------------------
    | 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
    |
    | /etc/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
    |
    | Thanks for using Apache. The Apache Group
    | http://www.apache.org/
    +------------------------------------------
    以上でインストール終了.

2. 設定ファイルの変更

設定ファイルは /etc/apache/httpd.conf
以前の設定ファイルは httpd.conf , srm.conf, access.conf に分けていたが,
apache_1.3.11 からは httpd.conf だけに統一されるようになった.

以下に主な変更箇所を示す.

### Section 1: Global Environment
### Section 2: 'Main' server configuration

3. 注意点


更新日 : 2001/08/31 (道政 広一)
作成日 : 2001/07/30
Copyright (C) 2000 epnetfan All rights reserved.