Korea FreeBSD Users Group News, Internal, Projects, Home
Software, Support, Documentation

Re: [KFUG] apache.sh .. ?



[ ³¯Â¥¼ø »öÀÎ ] [ ´ñ±Û¼ø »öÀÎ ] [ ÃÖ»óÀ§ »öÀÎ] [ °Ë»ö]

[ÀÌÀü ±Û] [´ÙÀ½ ±Û] [ÀÌÀü ´ñ±Û] [´ÙÀ½ ´ñ±Û]


/etc/rc.conf에 

apache_enable="YES"
mysql_enable="YES"

를 추가하고 스크립트를 다시 돌려 보세요. 요즘에는 rc.subr(8)을
이용하도록 많은 포트들이 변환되고 있어서, 대몬 류는 대부분 설치 후에
서비스 동작 여부를 /etc/rc.conf에서 지정하도록 되어 있습니다.

From: space sin <secureis@xxxxxxxxx>
Subject: [KFUG] apache.sh 파일이 제대로 실행이 안되는것 같은데.. 왜 이런가요?
Date: Tue, 11 Jan 2005 18:50:55 +0900

> 새로이 apache-1.3.33_1 를 깔았습니다.
> 그리고 재 실행을 위해서 
> # /usr/local/etc/rc.d/apache.sh start
> 를 실행하니 데몬이 안 올라오네요..
> (프비 4.10)
> 그냥 간단히 apachectl start 해도 되는 것은 알고 있는데..(이걸로 하면 됩니다.)
> 시스템을 재부팅후에도 이것이 이 때문에 아파치 데몬이 제대로 실행이 안됩니다.
> 
> 해당 스크립트는 아파치 설치하면서 자동으로 생성된것인데.. 떱..
> 확인해 보니 mysql(4.0.23a) 스크립트로 똑같이 자동으로 스크립트는 생성이 되어 있는데.. 실행을 하면 데몬이 안 올라오네요..
> 
> 실행시키는 스크립트 보다 왜 안 되는 스크립트가 포함되어 있는지가 더 궁금하네요.. ^^;;
> 
> 옵션들이 많이 지정되어 있어 왠지 아래 스크립트들을 실행되고 하고 싶지만.. 실력이 안되어서..
> 다른 분들은 실행 시키기 위해 어떤 스크립트를 사용하시나요?
> 좋은 스크립트 있으면 좀 올려주시면 감사하겠습니다.. ^^;;
> 
> 메일링이 다시 되니 좋군요.. ㅎㅎㅎ
> 
> # cat apache.sh 
> #!/bin/sh
> # $FreeBSD: ports/www/apache13/files/apache.sh,v 1.9 2004/08/29
> 11:07:42 ache Exp $
> 
> # PROVIDE: apache
> # REQUIRE: DAEMON
> # BEFORE: LOGIN
> # KEYWORD: FreeBSD shutdown
> 
> # Define these apache_* variables in one of these files:
> #       /etc/rc.conf
> #       /etc/rc.conf.local
> #       /etc/rc.conf.d/apache
> #
> # DO NOT CHANGE THESE DEFAULT VALUES HERE
> #
> apache_enable=${apache_enable-"NO"}
> apache_flags=${apache_flags-""}
> apache_pidfile=${apache_pidfile-"/var/run/httpd.pid"}
> 
> . /usr/local/etc/rc.subr
> 
> name="apache"
> rcvar=`set_rcvar`
> command="/usr/local/sbin/httpd"
> 
> load_rc_config $name
> 
> pidfile="${apache_pidfile}"
> 
> start_cmd="echo \"Starting ${name}.\"; /usr/bin/limits -U www
> ${command} ${apache_flags} ${command_args}"
> 
> run_rc_command "$1"
> 
> ====================================
> 
> # cat mysql-server.sh 
> #!/bin/sh
> #
> # $FreeBSD: ports/databases/mysql40-server/files/mysql-server.sh,v 1.7
> 2004/10/31 10:43:07 ale Exp $
> #
> 
> # PROVIDE: mysql
> # REQUIRE: NETWORKING SERVERS
> # BEFORE: DAEMON
> # KEYWORD: shutdown
> 
> #
> # Add the following line to /etc/rc.conf to enable mysql:
> # mysql_enable (bool):          Set to "NO" by default.
> #                               Set it to "YES" to enable MySQL.
> # mysqllimits_enable (bool):    Set to "NO" by default.
> #                               Set it to yes to run `limits $limits_args`
> #                               just before mysql starts.
> # mysqllimits_args (str):       Default to "-e -U mysql"
> #                               Arguments of pre-start limits run.
> #
> 
> . /usr/local/etc/rc.subr
> 
> name="mysql"
> rcvar=`set_rcvar`
> mysql_dbdir="/var/db/mysql"
> mysql_user="mysql"
> pidfile="${mysql_dbdir}/`/bin/hostname`.pid"
> command="/usr/local/bin/mysqld_safe"
> command_args="--user=${mysql_user} --datadir=${mysql_dbdir}
> --pid-file=${pidfile} > /dev/null &"
> procname="/usr/local/libexec/mysqld"
> start_precmd="${name}_prestart"
> 
> [ -z "$mysql_enable" ]          && mysql_enable="NO"
> [ -z "$mysqllimits_enable" ]    && mysqllimits_enable="NO"
> [ -z "$mysqllimits_args" ]      && mysqllimits_args="-e -U ${mysql_user}"
> 
> mysql_prestart()
> {
>         if checkyesno mysqllimits_enable; then
>                 eval `/usr/bin/limits ${mysqllimits_args}` 2>/dev/null
>         else
>                 return 0
>         fi
> }
> 
> required_dirs="${mysql_dbdir}"
> required_files="${mysql_dbdir}/mysql/host.frm
> ${mysql_dbdir}/mysql/user.frm ${mysql_dbdir}/mysql/db.frm"
> 
> load_rc_config $name
> run_rc_command "$1"

--
CHOI Junho <http://www.kr.FreeBSD.org/~cjh>     cjh@[kr.]FreeBSD.org
Key fingerprint = 1369 7374 A45F F41A F3C0  07E3 4A01 C020 E602 60F5
_______________________________________________
한국 FreeBSD 사용자 그룹(KFUG) questions 메일링 리스트
questions at kr.FreeBSD.org
http://www.kr.FreeBSD.org/mailman/listinfo/questions


[ ³¯Â¥¼ø »öÀÎ ] [ ´ñ±Û¼ø »öÀÎ ] [ ÃÖ»óÀ§ »öÀÎ] [ °Ë»ö]

Copyright © 1998-2005 Korea FreeBSD Users Group.
All rights reserved. webmaster at kr.FreeBSD.org
$Date: 2005/01/11 21:30:59 $
Powered by FreeBSD