리눅스데몬 스크립트파일 설명 -5- |
작성자 : (주)수퍼유저코리아, http://www.superuser.co.kr 서버팀 |
/etc/rc.d/init.d 디렉토리내에 있는 리눅스데몬스크립트 파일들
|
76. 데몬 스크립트 파일 : /etc/rc.d/init.d/rstatd |
 | |
rstatd는 커널통계서버 데몬입니다. rstat 프로토콜은 네트워크에 존재하는 사용자들이 다른 네트워크에 존재하는 시스템 정보를 검색할 수 있는 것을 허용합니다.
사용옵션 : start|stop|status|restart
데몬파일 : /usr/sbin/rpc.rstatd
스크립트 사용예
[root@command init.d]# /etc/rc.d/init.d/rstatd stop
Stopping rstat services: [ OK ]
[root@command init.d]#
[root@command init.d]# /etc/rc.d/init.d/rstatd start
Starting rstat services: [ OK ]
[root@command init.d]#
[root@command init.d]# /etc/rc.d/init.d/rstatd restart
Stopping rstat services: [ OK ]
Starting rstat services: [ OK ]
[root@command init.d]#
[root@command init.d]# /etc/rc.d/init.d/rstatd status
rpc.rstatd (pid 4642) is running...
[root@command init.d]#
[root@command init.d]# ps -ef | grep rstatd
root 4642 1 0 18:24 ? 00:00:00 rpc.rstatd
root 4651 2340 0 18:24 pts/0 00:00:00 grep rstatd
[root@command init.d]# |
|
77. 데몬 스크립트 파일 : /etc/rc.d/init.d/rusersd |
 | |
네트워크로 통신이 가능한 다른 서버에 어떤 사용자들이 로그인되어 있는가를 확인할 수 있는 rusersd데몬을 시작하고 종료할 수 있는 스크립트입니다.
사용옵션 : start|stop|status|restart
데몬파일 : /usr/sbin/rpc.rusersd
스크립트 사용예
[root@command init.d]# /etc/rc.d/init.d/rusersd stop
Stopping rusers services: [ OK ]
[root@command init.d]#
[root@command init.d]# /etc/rc.d/init.d/rusersd start
Starting rusers services: [ OK ]
[root@command init.d]#
[root@command init.d]# /etc/rc.d/init.d/rusersd restart
Stopping rusers services: [ OK ]
Starting rusers services: [ OK ]
[root@command init.d]#
[root@command init.d]# /etc/rc.d/init.d/rusersd status
rpc.rusersd (pid 4725) is running...
[root@command init.d]#
[root@command init.d]# ps -ef | grep rusersd
nobody 4725 1 0 18:27 ? 00:00:00 [rpc.rusersd]
root 4740 2340 0 18:27 pts/0 00:00:00 grep rusersd
[root@command init.d]# |
|
78. 데몬 스크립트 파일 : /etc/rc.d/init.d/rwalld |
 | |
네트워크로 통신이 가능한 다른 서버의 모든 사용자들에게 특정 메시지를 원격서버에서 보낼 수 있는 rwalld데몬을 시작하고 종료할 수 있는 스크립트입니다. 즉, rwalld는 마치 로컬사용자에게 메시지를 전달하는 wall명령어 처럼 원격서버의 모든 사용자들에게 메시지를 전달할 수 있습니다. 사용옵션 : start|stop|status|restart
데몬파일 : /usr/sbin/rpc.rwalld
스크립트 사용예
[root@command init.d]# /etc/rc.d/init.d/rwalld stop
Stopping rwalld: [ OK ]
[root@command init.d]#
[root@command init.d]# /etc/rc.d/init.d/rwalld start
Starting rwalld: [ OK ]
[root@command init.d]#
[root@command init.d]# /etc/rc.d/init.d/rwalld restart
Stopping rwalld: [ OK ]
Starting rwalld: [ OK ]
[root@command init.d]#
[root@command init.d]# /etc/rc.d/init.d/rwalld status
rpc.rwalld (pid 4790) is running...
[root@command init.d]#
[root@command init.d]# ps -ef | grep rwalld
nobody 4790 1 0 18:31 ? 00:00:00 [rpc.rwalld]
root 4799 2340 0 18:31 pts/0 00:00:00 grep rwalld
[root@command init.d]# |
|
79. 데몬 스크립트 파일 : /etc/rc.d/init.d/rwhod |
 | |
rwhod는 rwhod데몬이 실행되어 있는 원격서버에 로그인되어 있는 모든 사용자의 로그인 정보를 확인할 수 있는 데몬입니다. 이 데몬의 시작과 종료를 할 수 있는 스크립트입니다. 마치 finger와 비슷하다고 할 수 있습니다.
사용옵션 : start|stop|status|restart
데몬파일 : /usr/sbin/rwhod
스크립트 사용예
[root@command init.d]# /etc/rc.d/init.d/rwhod stop
Stopping rwho services: [ OK ]
[root@command init.d]#
[root@command init.d]# /etc/rc.d/init.d/rwhod start
Starting rwho services: [ OK ]
[root@command init.d]#
[root@command init.d]# /etc/rc.d/init.d/rwhod restart
Stopping rwho services: [ OK ]
Starting rwho services: [ OK ]
[root@command init.d]#
[root@command init.d]# /etc/rc.d/init.d/rwhod status
rwhod (pid 4863 4862) is running...
[root@command init.d]#
[root@command init.d]# ps -ef | grep rwhod
root 4862 1 0 18:36 ? 00:00:00 rwhod
root 4863 4862 0 18:36 ? 00:00:00 rwhod
root 4872 2340 0 18:36 pts/0 00:00:00 grep rwhod
[root@command init.d]# |
|
80. 데몬 스크립트 파일 : /etc/rc.d/init.d/saslauthd |
 | |
saslauthd는 Cyrus-sasl라이브러리를 대신하는 평문텍스트 인증요청을 담당하는 서버 프로세스입니다. 이 프로세스를 실행하고 종료하는 스크립트입니다.
사용옵션 : start|stop|status|reload|restart|condrestart
데몬파일 : /usr/sbin/saslauthd
스크립트 사용예
[root@command init.d]# /etc/rc.d/init.d/saslauthd stop
Stopping saslauthd: [ OK ]
[root@command init.d]#
[root@command init.d]# /etc/rc.d/init.d/saslauthd start
Starting saslauthd: [ OK ]
[root@command init.d]#
[root@command init.d]# /etc/rc.d/init.d/saslauthd restart
Stopping saslauthd: [ OK ]
Starting saslauthd: [ OK ]
[root@command init.d]#
[root@command init.d]# /etc/rc.d/init.d/saslauthd status
saslauthd (pid 4991 4990 4989 4988 4987) is running...
[root@command init.d]#
[root@command init.d]# ps -ef | grep saslauthd
root 4987 1 0 18:40 ? 00:00:00 /usr/sbin/saslauthd -m /var/run/saslauthd/mux -a shadow
root 5006 2340 0 18:40 pts/0 00:00:00 grep saslauthd
[root@command init.d]# |
|
81. 데몬 스크립트 파일 : /etc/rc.d/init.d/sendmail |
 | |
여러분들께서 잘 아시는 sendmail은 메일 릴레이 서버로서 가장 대표적이고 가장 많이 사용되는 MTA(Mail Transport Agent)입니다. 이 스크립트는 sendmail의 실행과 종료, 재시작을 할 때 사용됩니다.
사용옵션 : start|stop|restart|condrestart|status
데몬파일 : /usr/sbin/sendmail
설정파일 : /etc/mail/sendmail.cf 또는 /etc/sendmail.cf
로그파일 : /var/log/maillog
관련디렉토리 : /etc/mail
스크립트 사용예
[root@command init.d]# /etc/rc.d/init.d/sendmail stop
Shutting down sendmail: [ OK ]
Shutting down sm-client: [ OK ]
[root@command init.d]#
[root@command init.d]# /etc/rc.d/init.d/sendmail start
Starting sendmail: [ OK ]
Starting sm-client: [ OK ]
[root@command init.d]#
[root@command init.d]# /etc/rc.d/init.d/sendmail restart
Shutting down sendmail: [ OK ]
Shutting down sm-client: [ OK ]
Starting sendmail: [ OK ]
Starting sm-client: [ OK ]
[root@command init.d]#
[root@command init.d]# /etc/rc.d/init.d/sendmail status
sendmail (pid 5120 5111) is running...
[root@command init.d]#
[root@command init.d]# ps -ef | grep sendmail
root 5111 1 0 18:42 ? 00:00:00 [sendmail]
smmsp 5120 1 0 18:42 ? 00:00:00 [sendmail]
root 5136 2340 0 18:42 pts/0 00:00:00 grep sendmail
[root@command init.d]# |
|
82. 데몬 스크립트 파일 : /etc/rc.d/init.d/single |
 | |
시스템 실행레벨(runlevel) 1로 가고자 할 때 사용하는 스크립트입니다. 이 스크립트가 실행되면 시스템의 모든 프로세스들을 죽인 다음 시스템을 실행레벨 1상태로 만들어 줍니다. 실행레벨 1상태는 관리자(root) 전용모드입니다.
|
83. 데몬 스크립트 파일 : /etc/rc.d/init.d/smartd |
 | |
SMARTD(Self Monitoring and Reporting Technology)는 자체모니터링(Self-Monitoring)과 자체 분석(Self-Analysis) 리포팅기술 시스템 데몬입니다. 이 기술은 디스크드라이브 장애(에러)를 미리 알려줄 수 있도록 하여 신뢰성을 점검하는데 주로 사용됩니다.
그리고 SMARTD 데몬에 의한 에러메시지는 SYSLOG인터페이스(참고 : 설정파일 /etc/syslog.conf, 관련데몬 : /sbin/syslogd)를 이용하여 관리자에게 알려지도록 구현되었있습니다.
사용옵션 : start|stop|restart|status
데몬파일 : /usr/sbin/smartd
스크립트 사용예
[root@command init.d]# /etc/rc.d/init.d/smartd stop
Shutting down smartd: [ OK ]
[root@command init.d]#
[root@command init.d]# /etc/rc.d/init.d/smartd start
Starting smartd: [ OK ]
[root@command init.d]#
[root@command init.d]# /etc/rc.d/init.d/smartd restart
Shutting down smartd: [ OK ]
Starting smartd: [ OK ]
[root@command init.d]#
[root@command init.d]# /etc/rc.d/init.d/smartd status
smartd (pid 5348) is running...
[root@command init.d]#
[root@command init.d]# ps -ef | grep smartd
root 5348 1 0 19:00 ? 00:00:00 /usr/sbin/smartd
root 5391 2340 0 19:01 pts/0 00:00:00 grep smartd
[root@command init.d]# |
|
84. 데몬 스크립트 파일 : /etc/rc.d/init.d/smb |
 | |
삼바(samba) 데몬 실행(중지) 스크립트입니다. 여러분들께서도 많이 들어보셨던 삼바(samba)는 윈도우 시스템과의 파일 및 프린트공유를 위한 서버입니다. 이 스크립트를 실행하면 SMBD데몬과 NMBD데몬을 실행시킵니다. 삼바데몬 중 SMBD데몬은 삼바의 주데몬이며 NMBD데몬은 NETBIOS 네임서비스 데몬입니다.
사용옵션 : start|stop|restart|reload|status|condrestart
PID파일1 : /var/run/samba/smbd.pid
PID파일2 : /var/run/samba/nmbd.pid
설정파일 : /etc/samba/smb.conf
데몬파일
- /usr/sbin/nmbd
- /usr/sbin/smbd
관련디렉토리 : /etc/samba
로그파일위치 : /var/log/samba
스크립트 사용예
[root@command init.d]# /etc/rc.d/init.d/smb stop
Shutting down SMB services: [ OK ]
Shutting down NMB services: [ OK ]
[root@command init.d]#
[root@command init.d]# /etc/rc.d/init.d/smb start
Starting SMB services: [ OK ]
Starting NMB services: [ OK ]
[root@command init.d]#
[root@command init.d]# /etc/rc.d/init.d/smb restart
Shutting down SMB services: [ OK ]
Shutting down NMB services: [ OK ]
Starting SMB services: [ OK ]
Starting NMB services: [ OK ]
[root@command init.d]#
[root@command init.d]# /etc/rc.d/init.d/smb status
smbd (pid 5656) is running...
nmbd (pid 5660) is running...
[root@command init.d]#
[root@command init.d]# ps -ef | grep mbd
root 5656 1 0 20:18 ? 00:00:00 smbd -D
root 5660 1 0 20:18 ? 00:00:00 nmbd -D
root 5673 5553 0 20:19 pts/1 00:00:00 grep mbd
[root@command init.d]# |
|
85. 데몬 스크립트 파일 : /etc/rc.d/init.d/snmpd |
 | |
SNMP(Simple Network Management Protocol)는 네트워크 상황을 모니터링 할 수 있는 프로토콜입니다. 흔히 MRTG등으로 네트워크 트래픽을 모니터링하거나 특정 장비의 디바이스의 정보를 확인할 때에도 종종 사용되는 프로토콜입니다.
사용옵션 : start|stop|status|restart|condrestart|reload
데몬파일 : /usr/sbin/snmpd
설정파일
- /etc/snmp/snmpd.conf
- /usr/share/snmp/snmpd.conf
관련디렉토리 : /etc/snmp/
PID파일 : /var/run/snmpd
스크립트 사용예
[root@command init.d]# /etc/rc.d/init.d/snmpd stop
Stopping snmpd: [ OK ]
[root@command init.d]#
[root@command init.d]# /etc/rc.d/init.d/snmpd start
Starting snmpd: [ OK ]
[root@command init.d]#
[root@command init.d]# /etc/rc.d/init.d/snmpd restart
Stopping snmpd: [ OK ]
Starting snmpd: [ OK ]
[root@command init.d]#
[root@command init.d]# /etc/rc.d/init.d/snmpd status
snmpd (pid 5755) is running...
[root@command init.d]#
[root@command init.d]# ps -ef | grep snmpd
root 5755 1 2 20:27 ? 00:00:00 /usr/sbin/snmpd -s -l /dev/null -P /var/run/snmpd -a
root 5770 5553 0 20:27 pts/1 00:00:00 grep snmpd
[root@command init.d]# |
|
86. 데몬 스크립트 파일 : /etc/rc.d/init.d/snmptrapd |
 | |
snmptrapd은 SNMP(Simple Network Management Protocol) 트랩데몬(Trap Daemon)입니다. 즉 snmptrapd 데몬은 일종의 SNMP 어플리케이션으로서 SNMP 에이전트(Agent)로부터 TRAP과 INFORM메시지를 받고 기록(저장)하는 데몬으로서 UDP 162번을 사용합니다.
사용옵션 : start|stop|status|restart|condrestart|reload
데몬파일 : /usr/sbin/snmptrapd
설정파일
- /etc/snmp/snmptrapd.conf
- /usr/share/snmp/snmptrapd.conf
PID파일 : /var/run/snmptrapd.pid
스크립트 사용예
[root@command init.d]# /etc/rc.d/init.d/snmptrapd stop
Stopping snmptrapd: [ OK ]
[root@command init.d]#
[root@command init.d]# /etc/rc.d/init.d/snmptrapd start
Starting snmptrapd: [ OK ]
[root@command init.d]#
[root@command init.d]# /etc/rc.d/init.d/snmptrapd restart
Stopping snmptrapd: [ OK ]
Starting snmptrapd: [ OK ]
[root@command init.d]#
[root@command init.d]# /etc/rc.d/init.d/snmptrapd status
snmptrapd (pid 5853) is running...
[root@command init.d]#
[root@command init.d]# ps -ef | grep snmptrapd
root 5853 1 0 20:33 ? 00:00:00 /usr/sbin/snmptrapd -s -u /var/run/snmptrapd.pid
root 5869 5553 0 20:34 pts/1 00:00:00 grep snmptrap
[root@command init.d]# |
|
87. 데몬 스크립트 파일 : /etc/rc.d/init.d/spamassassin |
 | |
이 스크립트는 spamassassin데몬을 시작(종료)하는 스크립트입니다. spamd는 스팸(SPAM)으로 사용되는 메일을 체크하기 위하여 SpamAssassin을 사용하는 데몬 프로세스입니다. 즉, 메일메시지 내의 텍스트를 분석함으로서 스팸메일인가를 확인하는 메일 필터링기능을 하는 데몬입니다.
사용옵션 : start|stop|restart|status|condrestart
데몬파일 : /usr/bin/spamd
|
88. 데몬 스크립트 파일 : /etc/rc.d/init.d/squid |
 | |
캐싱서버인 squid데몬을 실행(중지)하는 스크립트입니다. Squid의 정식이름은 “Internet Object Cache”로서 HTTP와 FTP, 고퍼(Gopher)등과 같은 인터넷 프로토콜등에 의해 요청된 인터넷 객체(Objects)들을 보관해두었다가 웹브라우즈등과 같은 어플리케이션등에서 로컬 Squid캐쉬데이터를 HTTP 프락시 서버로서 사용할 수 있도록 합니다. 따라서 사용할 수 있는 대역폭에 비해 접근속도를 높여주며 액세스타임(access time)을 낮출 수 있는 솔루션입니다. 참고로 squid는 TCP포트 3128번, UDP포트 3130번을 사용합니다.
사용옵션 : start|stop|status|reload|restart|condrestart
데몬파일 : /usr/sbin/squid
PID파일 : /var/run/squid.pid
관련디렉토리 : /etc/squid/
설정파일 : /etc/squid/squid.conf
로그파일 : /var/log/squid/
스크립트 사용예
[root@command init.d]# /etc/rc.d/init.d/squid start
init_cache_dir /var/spool/squid... Starting squid: .[ OK ]
[root@command init.d]#
[root@command init.d]# /etc/rc.d/init.d/squid stop
Stopping squid: [ OK ]
[root@command init.d]#
[root@command init.d]# /etc/rc.d/init.d/squid start
Starting squid: .[ OK ]
[root@command init.d]#
[root@command init.d]# /etc/rc.d/init.d/squid restart
Stopping squid: [ OK ]
Starting squid: .[ OK ]
[root@command init.d]#
[root@command init.d]# ps -ef | grep squid
root 6042 1 0 20:53 ? 00:00:00 squid -D
squid 6044 6042 2 20:53 ? 00:00:00 [squid]
squid 6046 6044 0 20:53 ? 00:00:00 (unlinkd)
root 6049 5553 0 20:53 pts/1 00:00:00 grep squid
[root@command init.d]# |
|
89. 데몬 스크립트 파일 : /etc/rc.d/init.d/sshd |
 | |
sshd라는 OpenSSH서버데몬을 실행(중지)하는 스크립트입니다. telnet과는 달리 ssh는 암호화하여 통신을 하기 때문에 보안을 위한 통신방법으로 주로 사용됩니다. Telnet처럼 원격서버 로그인을 하는 ssh를 사용하려면 sshd데몬이 실행되어 있어야합니다. 이 스크립트는 sshd데몬을 실행시켜주는 스크립트입니다. 참고로 ssh는 TCP 22번과 UDP 22번을 사용합니다.
사용옵션 : start|stop|restart|reload|condrestart|status
데몬파일 : /usr/sbin/sshd
관련디렉토리 : /etc/ssh/
PID파일 : /var/run/sshd.pid
설정파일
- /etc/ssh/ssh_host_key
- /etc/ssh/ssh_host_key.pub
- /etc/ssh/ssh_random_seed
- /etc/ssh/sshd_config
스크립트 사용예
[root@command init.d]# /etc/rc.d/init.d/sshd stop
Stopping sshd:[ OK ]
[root@command init.d]#
[root@command init.d]# /etc/rc.d/init.d/sshd start
Starting sshd:[ OK ]
[root@command init.d]#
[root@command init.d]# /etc/rc.d/init.d/sshd restart
Stopping sshd:[ OK ]
Starting sshd:[ OK ]
[root@command init.d]#
[root@command init.d]# /etc/rc.d/init.d/sshd status
sshd (pid 6140 5551) is running...
[root@command init.d]#
[root@command init.d]# ps -ef | grep sshd
root 5551 1 0 20:12 ? 00:00:00 /usr/sbin/sshd
root 6140 1 0 21:01 ? 00:00:00 /usr/sbin/sshd
root 6156 5553 0 21:01 pts/1 00:00:00 grep sshd
[root@command init.d]# |
|
|
 |