vine linux 3.1の install apache2関係
sorry Japanese only
PAGE作成日 2005/07/24
最終更新日 2006/08/17
page size = Mbyte

apache 2.0.54
MySQL 4.0.23
PHP 5.0.4
の順で installしていきます。

apache2のコンパイル

apache2は、私の場合、以下のオプションで作成します。
configure --enable-info --enable-logio --enable-log-config --enable-so --enable-rewrite

オプションの説明をすると
--enable-infoserver-infoを表示させるのに必要
--enable-logioaccess.logに記録される転送量を、実際の転送量にする
--enable-log-configログをカスタマイズするのに必要。(デフォルトで Enableか?)
--enable-soDSOでモジュールを Loadするのに必要
--enable-rewriterewriteエンジンを使うのに必要

configureの実行結果はこちら => apache2-configure.html
makeの実行結果はこちら => apache2-make.html
make installの実行結果はこちら => apache2-make-install.html

apache2 自動起動の設定

baseさんを参考にさせていただきました。

/etc/rc.d/init.dへ /usr/local/apache2/bin/apachectlへのリンクを張る
[root]# cd /etc/rc.d/init.d
[root]# ln -s /usr/local/apache2/bin/apachectl httpd
[root]# ls -l
lrwxrwxrwx    1 root     root           32 Aug 16 20:23 httpd -> /usr/local/apache2/bin/apachectl*

apachectlの最初のコメント行の最後あたりに、以下の緑色の 2行を追加
# When multiple arguments are given, only the error from the _last_
# one is reported.  Run "apachectl help" for usage info
#
#chkconfig: - 2345 85 15
#description:httpd
#
ARGV="$@"
#
# |||||||||||||||||||| START CONFIGURATION SECTION  ||||||||||||||||||||
# --------------------                              --------------------
run levelが 2,3,4,5の場合(1=single user modeと 6=reboot modeを除く mode時)に
start順番 85番目で httpd startが実行されます。

2006/08/17追記
vine linux 3.2を新たに installしたのですが、その時は、上記の 2行付け足しではうまく動作してくれませんでした
以下のような行を追加しました
# When multiple arguments are given, only the error from the _last_
# one is reported.  Run "apachectl help" for usage info
#
# chkconfig: 2345 85 15
# description: httpd
#
ARGV="$@"
#
chkconfig: の後ろの - を外した
#の後ろに半角スペースを空けた

chkconfigコマンドを使って serviceの start upへ登録
[root]# chkconfig --add httpd
[root]# chkconfig --list httpd
httpd           0:off   1:off   2:on    3:on     4:on     5:on     6:off

これで linux起動すれば自動で apache2は起動するようになります。

続く


5881
戻る