itoigawabass

itoigawaのブログ

server

2005-05-12

apacheの自動起動
/etc/init.d/httpd を新規に作成して

#!/bin/bash
#
# Startup script for Apache Web Server
#
# chkconfig: 345 85 15
# description: Apache is a World Wide Web server. It is used to serve
# HTML files and CGI.
# processname: httpd
# pidfile: /var/run/httpd.pid
# config: /usr/local/apache2/conf/httpd.conf

# See how we were called.
case "$1" in
start)
/usr/local/apache2/bin/apachectl start
;;
stop)
/usr/local/apache2/bin/apachectl stop
;;
status)
/usr/local/apache2/bin/apachectl status
;;
restart)
/usr/local/apache2/bin/apachectl restart
;;
graceful)
/usr/local/apache2/bin/apachectl graceful
;;
*)
echo "Usage: $0 {start|stop|restart|graceful|status}"
exit 1
esac

exit 0


実行許可を与えて
chkconfig httpd on

カテゴリー:blog
タグ: