WWW サーバ
O R A N G E

Apache 1.3
■ メモ
  • Apache は/usr/local/apache 以下にインストールする.
  • Apache関係のログファイルは /usr/local/apache/logs/ 以下にとる.
  • htpasswd などのコマンドが使えるようにパスを通す.
  • 溜っていくログファイルを logrotate で分割する.
  • 稼働状況を表示出来るようにする.
■ ダウンロード ■ インストール
  1. ダウンロードしたソースを orange の適当なディレクトリと /usr/src にコピー
    $ cp apache_1.3.29.tar.gz ~mondo9/src/.
    # cp apache_1.3.29.tar.gz /usr/src/.
  2. 適当なディレクトリにて展開
    $ tar zxvf apache_1.3.29.tar.gz
    $ cd apache_1.3.29
  3. インストール
    $ ./configure --enable-module=status
    $ make
    # make install
    ただし webcounter も組み込む場合 (webcouner のインストールは こちら)は
    $ ./configure --enable-module=status --activate-module=src/modules/cntr/libcntr.a
    $ make
    # 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
    |                                                        |
    | Thanks for using Apache.       The Apache Group        |
    |                                http://www.apache.org/  |
    +--------------------------------------------------------+
        
インストール完了.

■ 設定ファイルの変更
$ cd /usr/local/apache/conf
# vi httpd.conf

設定ファイルはここを参照

■ パスを通す
  • bashは /etc/profile、cshは /etc/csh.login に以下のように PATH 変数を追加する.
    PATH="/usr/local/bin:/usr/bin:/bin:/usr/bin/X11 :/usr/local/apache/bin"
■ ログの分割
  1. /etc/logrotate.conf を編集して圧縮オプションを追加する. (compressのコメントアウトを外す)
  2. /etc/logrotate.d/ 以下に apache というファイルを置く. 編集内容はここを参照.
■ 起動
# /usr/local/apache/bin/apachectl start
Copyright © 2002 EPnetFaN
最終更新日: 2006/07/06 (加藤 真也)