Server/Apache/BootScript
をテンプレートにして作成
トップ
新規
一覧
検索
ヘルプ
開始行:
#contents
*はじめに [#hf9be13b]
いつも再起動後に、apachectlを叩くのは面倒なので、自動起動...
*rc.localに書き込み [#qf1ebcf6]
一番簡単なのは、''/etc/rc.d/rc.local''ファイルの末尾に、...
/usr/local/apache2/bin/apachectl startssl
*initdを使用する [#z8ebc769]
/etc/init.d
こちらに起動スクリプトを設置して、chkconfigやserviceコマ...
-次に紹介するスクリプトを用意して、''/etc/init.d/httpd''...
-以下のコマンドを実行して登録
# /sbin/chkconfig --add httpd
# /sbin/chkconfig httpd on
**スクリプト例 [#g3a7d6d6]
ファイル名は''http''として下さい。
(以下は、Vine Linuxにhttpdをrpmインストールした場合に設...
#!/bin/bash
#
# Startup script for the Apache Web Server
#
# chkconfig: - 85 15
# description: Apache is a World Wide Web server. It is...
# HTML files and CGI.
# Source function library.
. /etc/rc.d/init.d/functions
# Path to the httpd binary.
rootdir=/usr/local/apache2
httpd=${rootdir}/bin/apachectl
prog=httpd
RETVAL=0
start() {
echo -n $"Starting $prog: "
${httpd} startssl
RETVAL=$?
echo
return $RETVAL
}
stop() {
echo -n $"Stopping $prog: "
${httpd} stop
RETVAL=$?
echo
}
restart() {
echo -n $"Restarting $prog: "
${httpd} restart
RETVAL=$?
echo
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
configtest)
$httpd -t
RETVAL=$?
;;
*)
echo $"Usage: $prog {start|stop|restart|reload|configte...
exit 1
esac
exit $RETVAL
RIGHT:2005-09-18 (日) 18:25:58
----
[[家サーバ管理帳]]
終了行:
#contents
*はじめに [#hf9be13b]
いつも再起動後に、apachectlを叩くのは面倒なので、自動起動...
*rc.localに書き込み [#qf1ebcf6]
一番簡単なのは、''/etc/rc.d/rc.local''ファイルの末尾に、...
/usr/local/apache2/bin/apachectl startssl
*initdを使用する [#z8ebc769]
/etc/init.d
こちらに起動スクリプトを設置して、chkconfigやserviceコマ...
-次に紹介するスクリプトを用意して、''/etc/init.d/httpd''...
-以下のコマンドを実行して登録
# /sbin/chkconfig --add httpd
# /sbin/chkconfig httpd on
**スクリプト例 [#g3a7d6d6]
ファイル名は''http''として下さい。
(以下は、Vine Linuxにhttpdをrpmインストールした場合に設...
#!/bin/bash
#
# Startup script for the Apache Web Server
#
# chkconfig: - 85 15
# description: Apache is a World Wide Web server. It is...
# HTML files and CGI.
# Source function library.
. /etc/rc.d/init.d/functions
# Path to the httpd binary.
rootdir=/usr/local/apache2
httpd=${rootdir}/bin/apachectl
prog=httpd
RETVAL=0
start() {
echo -n $"Starting $prog: "
${httpd} startssl
RETVAL=$?
echo
return $RETVAL
}
stop() {
echo -n $"Stopping $prog: "
${httpd} stop
RETVAL=$?
echo
}
restart() {
echo -n $"Restarting $prog: "
${httpd} restart
RETVAL=$?
echo
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
configtest)
$httpd -t
RETVAL=$?
;;
*)
echo $"Usage: $prog {start|stop|restart|reload|configte...
exit 1
esac
exit $RETVAL
RIGHT:2005-09-18 (日) 18:25:58
----
[[家サーバ管理帳]]
ページ名: