4,545,582 th visitor since 2017.2.1 ( Today : 1974 )
Computer ???
No. 65
Name. swindler
Subject. [Solaris] Run Control Script 멈추기와 구동 하기
Main Cate. Linux
Sub Cate.
Date. 2005-07-07 15:50
Hit. 4369 (210.124.73.182)
File.
Run Control Script 멈추기와 구동 하기

제공: howtosolaris.com

/etc/init.d 밑에는 시스템 부팅시 구동 되는 스크립트 파일들이 있슴다.
다음과 같은 script가 있죠

autofs.old*
sysetup* lp*
inetsvc power*
acct* init.mdlogd*
volmgt* SUNWmd.sync*
dhcp* SUNWmd.init*
./ lic_mgr*
dtlogin* mkdtab*
init.snmpdx* spc*
autofs* initpcmcia*
syslog* xntpd*
nfs.client* llc2*
init.dmi buttons_n_dials-setup*
rpc* cvc*
inetinit* uucp*
sendmail* asppp*
memtool* afbinit*
nscd* sysid.net*
inetsvc.ORIG.200109061035* autoinstall*
umask.sh sysid.sys*
httpd2* perf*
snort* audit*
tocsin* buildmnttab*
tocsin.Origin* PRESERVE*
volmgt.old* cachefs.root*
pcmcia* utmpd*
pcmcia.old* cacheos*
devlinks* cacheos.finish*
drvconfig* standardmounts*
rootusr* cron*
coreadm* nfs.server*
tsquantum* keymap*
tsquantum.old* RMTMPFILES*
devfsadm* ANNOUNCE*
rpc.old* MOUNTFSYS*
rootusr.old* cachefs.daemon*
syslog.old* savecore*
nfs.client.old* ufs_quota*
coreadm.old*

이 파일들을 vi로 열어 보신다면 무슨 기능들을 하는지 알수 있슴다.
하지만 시스템이 가동되는데 불필요한 것이나 새로운 설정을 하구 다시
restart를 하시려면 머추고 구동 시키는 작업을 해야 됩니다.

이렇게 합니다.

1> 정지 시킬때

# /etc/init.d/scriptname stop

2> 구동 시킬때

# /etc/init.d/scriptfile start

ex> # /etc/init.d/cron stop
# pgrep -f cron -----> 확인 합니다. 아마 아무 결과 없을 것입니다.

# /etc/init.d/cron start
# pgrep -f cron
3511

# pgrep -f cron -d, | xargs ps -fp
UID PID PPID C STIME TTY TIME CMD
root 3519 1 0 12:44:38 ? 0:00 /usr/sbin/cron




3. 그러면 시스템 부팅시마다 자동으로 실행하게 끔 파일을 만들어 보죠. 아파치를 예로 듭니다.

# cp startapache /etc/init.d
# chmod 0744 /etc/init.d/startapache
# chown root:sys /etc/init.d/startapache

링크설정
# cd /etc/init.d
# ln startapache /etc/rc2.d/S99apache
# ln startapache /etc/rc2.d/K99apache

위에서 startapache라는 파일은 아파치 구동 스크립트를 말합니다.

[바로가기 링크] : http://coolx.net/cboard/computer/65



Name
Password
Comment
Copyright © 1999-2017, swindler. All rights reserved. 367,611 visitor ( 1999.1.8-2004.5.26 ), 2,405,771 ( -2017.01.31)

  2HLAB   2HLAB_Blog   RedToolBox   Omil   Omil_Blog