apacheにはapacheの起動スクリプトが付属していますが、2.0系, 2.2系の場所を書きとめておきます。(久しぶりにmakeしたら、自動起動スクリプトが付属しているのを忘れてましたので...)
$ ls -l httpd-2.2.13/build/rpm/ total 28 -rwxr-xr-x 1 endo endo 3367 2006-07-12 12:38 httpd.init <-ココ -rw-r--r-- 1 endo endo 174 2004-11-25 09:01 httpd.logrotate -rw-r--r-- 1 endo endo 19151 2006-03-28 04:07 httpd.spec.in
この自動スクリプトを配備する場合は、次のように行います。
$ su - # cd /etc/rc.d/init.d # cp ~endo/tmp/httpd-2.2.13/build/rpm/httpd.init apache # chmod 755 apache # /sbin/chkconfig --add apache # /sbin/chkconfig --list apache <-ただの確認 apache 0:off 1:off 2:on 3:on 4:on 5:on 6:off
「chkconfig --add」で登録できない場合、次のように「chkconfig --level 35 httpd.init on」で登録下さい。
# chkconfig --level 35 apache on # chkconfig --list apache apache 0:off 1:off 2:off 3:on 4:off 5:on 6:off