강좌
클라우드/리눅스에 관한 강좌입니다.
리눅스 분류

리눅스데몬 스크립트파일 설명 -6-

작성자 정보

  • 웹관리자 작성
  • 작성일

컨텐츠 정보

본문

리눅스데몬 스크립트파일 설명 -6-

작성자 : (주)수퍼유저코리아, http://www.superuser.co.kr 서버팀


/etc/rc.d/init.d 디렉토리내에 있는 리눅스데몬스크립트 파일들


90. 데몬 스크립트 파일 : /etc/rc.d/init.d/syslog

top


syslog는 리눅스 시스템의 필수적인 로깅시스템입니다. 이런 로깅시스템을 시작(종료)하는 스크립트입니다. 이 스크립트에 의해 로깅시스템의 데몬인 syslogd가 실행되면 /etc/syslog.conf파일을 참조하여 각 설정에 해당하는 조건이 되면 지정된 로그파일에 로그메시지를 기록합니다. 로그파일이 기록되는 디렉토리는 /var/log/이며 대표적인 로그파일로는 /var/log/messages, /var/log/secure, 그리고 /var/log/maillog등이 있습니다. 이 스크립트에 의해 실행되는 데몬은 /sbin/syslogd/sbin/klogd가 있습니다.

/sbin/syslogd는 로깅시스템의 주된 그리고 일반적인 로그메시지를 기록하는 주데몬이며 klogd는 커널메시지를 기록하는 커널로그데몬입니다. 그리고 서버의 로그메시지를 원격서버에 실시간으로 저장하고자 한다면 syslogd데몬 실행시에 -r옵션을 사용하여 실행하시기 바랍니다. 참고로 syslogdUDP 514번을 사용합니다.

사용옵션 : start|stop|status|restart|condrestart

스크립트 사용예

[root@command init.d]# /etc/rc.d/init.d/syslog stop

Shutting down kernel logger: [ OK ]

Shutting down system logger: [ OK ]

[root@command init.d]#

[root@command init.d]# /etc/rc.d/init.d/syslog start

Starting system logger: [ OK ]

Starting kernel logger: [ OK ]

[root@command init.d]#

[root@command init.d]# /etc/rc.d/init.d/syslog restart

Shutting down kernel logger: [ OK ]

Shutting down system logger: [ OK ]

Starting system logger: [ OK ]

Starting kernel logger: [ OK ]

[root@command init.d]#

[root@command init.d]# /etc/rc.d/init.d/syslog status

syslogd (pid 6255) is running...

klogd (pid 6259) is running...

[root@command init.d]#

[root@command init.d]# ps -ef | grep syslog

root 6255 1 0 21:08 ? 00:00:00 syslogd -m 0

root 6276 5553 0 21:09 pts/1 00:00:00 grep syslog

[root@command init.d]#

 


91. 데몬 스크립트 파일 : /etc/rc.d/init.d/tux

top



TUX 커널기반의 http서버를 실행(종료)하는 스크립트입니다.

사용옵션 : start|stop|status|restart|condrestart|reload

데몬파일 : /usr/sbin/tux

설정파일

- /etc/sysconfig/tux

- /etc/sysctl.tux

스크립트 사용예

[root@command init.d]# /etc/rc.d/init.d/tux stop

Stopping tux:

[root@command init.d]#

[root@command init.d]# /etc/rc.d/init.d/tux start

Starting tux: [ OK ]

[root@command init.d]#

[root@command init.d]#

[root@command init.d]# /etc/rc.d/init.d/tux restart

Stopping tux:

Starting tux: [ OK ]

[root@command init.d]#

[root@command init.d]# /etc/rc.d/init.d/tux status

tux (pid 6613 6612 6611 6610 6609 6608 6607 6606 6605 6604 6603 6602 6601 6600 6599 6598 6597 6596 6595 6594 6593 6592 6591 6590 6589 6588 6587 6586 6585 6584 6583 6582 6581 6580 6579 6578 6577 6576 6575 6574 6573 6572 6571 6570 6569 6568 6567 6566 6565 6564 6563 6562 6561 6560 6559 6558 6557 6556 6555 6554 6553 6552 6551 6550 6549 6548 6547 6545) is running...

[root@command init.d]#

 

 

92. 데몬 스크립트 파일 : /etc/rc.d/init.d/ups

top


ups는 네트워크 UPS툴로서 UPS하드웨어를 모니터링하고 관리하기 위한 일반적인 인터페이스를 제공하는 프로그램들의 집합입니다. UPS 하드웨어를 모니터링하는 프로그램 데몬은 /usr/sbin/upsmon이며 UPS정보를 확인하는 주된 프로그램 데몬은 /usr/sbin/upsd입니다.

사용옵션 : start|stop|restart|condrestart|status

데몬파일

- /usr/sbin/upsd

- /usr/sbin/upsmon

관련디렉토리 : /etc/ups/

 


93. 데몬 스크립트 파일 : /etc/rc.d/init.d/vncserver

top

 

VNC서버 어플리케이션인 vncserver를 실행하는 스크립트입니다. 여러분들께서도 많이 들어보셨던 바와 같이 VNCSERVER는 원격지의 호스트에서 X윈도우 관리툴을 띄워서 시스템관리를 할 수 있는 아주 멋진 툴입니다. 이와 유사한 상용프로그램의 예로는 윈도우시스템에서의 PCAnyWhere와 리눅스, 솔라리스등에서도 사용가능한 프로그램으로는 Xmanager등이 있습니다.

사용옵션 : start|stop|restart|condrestart|status

스크립트 사용예

[root@command init.d]# /etc/rc.d/init.d/vncserver stop

Shutting down VNC server: [ OK ]

[root@command init.d]#

[root@command init.d]# /etc/rc.d/init.d/vncserver start

Starting VNC server: [ OK ]

[root@command init.d]#

[root@command init.d]# /etc/rc.d/init.d/vncserver restart

Shutting down VNC server: [ OK ]

Starting VNC server: [ OK ]

[root@command init.d]#

 


94. 데몬 스크립트 파일 : /etc/rc.d/init.d/vsftpd

top


Very Secure FTP 데몬인 vsftpd를 실행(중지)시키는 데몬스크립트입니다. 이 데몬은 xinetd환경에서 운영되며 wu_ftpproftpd처럼 일반 ftp서비스를 위하여 사용될 수 있습니다.

사용옵션 : start|stop|restart|condrestart|status

데몬파일 : /usr/sbin/vsftpd

관련디렉토리 : /etc/vsftpd/

설정파일 : /etc/vsftpd/vsftpd.conf

스크립트 사용예

[root@command init.d]# /etc/rc.d/init.d/vsftpd stop

Shutting down vsftpd: [ OK ]

[root@command init.d]#

[root@command init.d]# /etc/rc.d/init.d/vsftpd start

Starting vsftpd for vsftpd: [ OK ]

[root@command init.d]#

[root@command init.d]# /etc/rc.d/init.d/vsftpd restart

Shutting down vsftpd: [ OK ]

Starting vsftpd for vsftpd: [ OK ]

[root@command init.d]#

 


95. 데몬 스크립트 파일 : /etc/rc.d/init.d/winbind

top


삼바 winbind데몬인 winbindd를 실행(중지)하는 스크립트입니다.

사용옵션 : start|stop|restart|reload|status|condrestart

데몬파일 : /usr/sbin/winbindd

PID파일 : /var/cache/samba/winbind.pid

설정파일 : /etc/samba/smb.conf

스크립트 사용예

[root@command init.d]# /etc/rc.d/init.d/winbind stop

Shutting down Winbind services: [ OK ]

[root@command init.d]#

[root@command init.d]# /etc/rc.d/init.d/winbind start

Starting Winbind services: [ OK ]

[root@command init.d]#

[root@command init.d]# /etc/rc.d/init.d/winbind restart

Shutting down Winbind services: [ OK ]

Starting Winbind services: [ OK ]

[root@command init.d]#

[root@command init.d]# /etc/rc.d/init.d/winbind status

winbindd (pid 7105) is running...

[root@command init.d]#

[root@command init.d]# ps -ef | grep winbindd

root 7105 1 0 22:14 ? 00:00:00 winbindd

root 7114 5553 0 22:14 pts/1 00:00:00 grep winbind

[root@command init.d]#


96. 데몬 스크립트 파일 : /etc/rc.d/init.d/xfs

top


리눅스 부팅과 종료시에 X윈도우 폰트서버(Xfontserver)를 실행하고 중지하는 스크립트입니다. 로컬 서버의 X윈도우에서 폰트를 사용하거나 또는 원격서버에서 사용할 수도 있습니다.

사용옵션 : start|stop|status|restart|reload|condrestart

데몬파일 : /usr/X11R6/bin/xfs

설정파일 : /etc/X11/fs/config

스크립트 사용예

[root@command init.d]# /etc/rc.d/init.d/xfs stop

Shutting down xfs: [ OK ]

[root@command init.d]#

[root@command init.d]# /etc/rc.d/init.d/xfs start

Starting xfs: [ OK ]

[root@command init.d]#

[root@command init.d]# /etc/rc.d/init.d/xfs restart

Restarting xfs:

Shutting down xfs: [ OK ]

Starting xfs: [ OK ]

[root@command init.d]#

[root@command init.d]# /etc/rc.d/init.d/xfs status

xfs (pid 7357) is running...

[root@command init.d]#

[root@command init.d]# ps -ef | grep xfs

xfs 7357 1 2 22:18 ? 00:00:00 [xfs]

root 7366 5553 0 22:18 pts/1 00:00:00 grep xfs

[root@command init.d]#

 


97. 데몬 스크립트 파일 : /etc/rc.d/init.d/xinetd

top


리눅스 서버의 인터넷 수퍼데몬인 XINETD데몬을 실행시키거나 중지시키는 데몬입니다. XinetdTCP_Wrapper와 함께 사용되며 대부분의 인터넷 서비스들을 관장하며 telnet이나 ftp등과 같은 특정 서비스요청을 사용자프로세스와 서비스데몬을 연결시켜주는 역할을 합니다.

사용옵션 : start|stop|status|restart|condrestart|reload

데몬파일 : /usr/sbin/xinetd

관련디렉토리 : /etc/xinetd.d/

설정파일

- /etc/sysconfig/network

- /etc/xinetd.conf

PID파일 : /var/run/xinetd.pid

스크립트 사용예

[root@command init.d]# /etc/rc.d/init.d/xinetd stop

Stopping xinetd: [ OK ]

[root@command init.d]#

[root@command init.d]# /etc/rc.d/init.d/xinetd start

Starting xinetd: [ OK ]

[root@command init.d]#

[root@command init.d]# /etc/rc.d/init.d/xinetd restart

Stopping xinetd: [ OK ]

Starting xinetd: [ OK ]

[root@command init.d]#

[root@command init.d]# /etc/rc.d/init.d/xinetd status

xinetd (pid 7437) is running...

[root@command init.d]#

[root@command init.d]# ps -ef | grep xinetd

root 7437 1 0 22:25 ? 00:00:00 xinetd -stayalive -reuse -pidfile /var/run/xinetd.pid

root 7453 5553 0 22:25 pts/1 00:00:00 grep xinetd

[root@command init.d]#

 


98. 데몬 스크립트 파일 : /etc/rc.d/init.d/ypbind

top


NIS/YP 클라이언트 시스템에서 실행되는 데몬으로서 NIS 도메인(domain)에 바인드시키는 역할을 합니다. NIS클라이언트에서 수행되기 위하여 반드시 glibc 기반 시스템에서 실행되어야합니다. 하지만 NIS를 사용하지 않는 시스템에서 실행되어져서는 안됩니다.

사용옵션 : start|stop|status|restart|condrestart

데몬파일 : /sbin/ypbind

설정파일 : /etc/yp.conf


99. 데몬 스크립트 파일 : /etc/rc.d/init.d/yppasswdd

top


YP환경하에서 사용자의 password를 변경할 수 있는 yppasswdd데몬을 시작하는 스크립트입니다. yppasswdd 데몬은 NIC환경에서 사용자들이 자신의 패스워드를 변경하도록 하는 RPC서버입니다. 또한 yppasswdd 데몬은 해당 NIS 도메인(domain)NIS 마스트서버환경에서 실행되어야합니다. 이런 YPNIS환경에서 대부분의 경우 사용자의 패스워드를 변경하는 클라이언트 프로그램은 yppasswd를 이용합니다.

사용옵션 : start|stop|status|restart|reload|condrestart

데몬파일 : /usr/sbin/rpc.yppasswdd

스크립트 사용예

[root@command init.d]# /etc/rc.d/init.d/yppasswdd stop

Stopping YP passwd service: [ OK ]

[root@command init.d]#

[root@command init.d]# /etc/rc.d/init.d/yppasswdd start

Starting YP passwd service: [ OK ]

[root@command init.d]#

[root@command init.d]# /etc/rc.d/init.d/yppasswdd restart

Stopping YP passwd service: [ OK ]

Starting YP passwd service: [ OK ]

[root@command init.d]#

[root@command init.d]# /etc/rc.d/init.d/yppasswdd status

rpc.yppasswdd (pid 7664) is running...

[root@command init.d]#

[root@command init.d]# ps -ef | grep yppasswdd

root 7664 1 0 22:38 ? 00:00:00 rpc.yppasswdd

root 7679 5553 0 22:38 pts/1 00:00:00 grep yppasswdd

[root@command init.d]#

 


100. 데몬 스크립트 파일 : /etc/rc.d/init.d/ypserv

top


YP 서버데몬인 ypserv를 실행하는 스크립트입니다. YP서버데몬 ypservNIS/YP 네트워킹 프로토콜의 표준 툴입니다. 즉 이를 이용하면 호스트네임, 사용자명, 또는 다른 정보들을 저장하고 있는 데이터베이스들의 정보를 네트워크 분산이 가능해 집니다. NIS서버 서비스를 하기 위해서는 NIS클라이언트 프로그램이 반드시 필요한 것은 아니며 NIS서버는 서버데몬만으로 서비스가 가능합니다.

사용옵션 : start|stop|status|restart|reload|condrestart

데몬파일 : /usr/sbin/ypserv

설정파일 : /etc/ypserv.conf

 


101. 데몬 스크립트 파일 : /etc/rc.d/init.d/ypxfrd

top


ypxfrd데몬을 실행하는 스크립트입니다. ypxfrdYP 매핑서버(map server)로서 yp 맵을 가속전송하기위하여 ypserv데몬에 부가적으로 실행되어야하는 데몬입니다.

사용옵션 : start|stop|status|restart|reload|condrestart

데몬파일 : /usr/sbin/rpc.ypxfrd

스크립트 사용예

[root@command init.d]# /etc/rc.d/init.d/ypxfrd stop

Stopping YP map server: [ OK ]

[root@command init.d]#

[root@command init.d]# /etc/rc.d/init.d/ypxfrd start

Starting YP map server: [ OK ]

[root@command init.d]#

[root@command init.d]# /etc/rc.d/init.d/ypxfrd restart

Stopping YP map server: [ OK ]

Starting YP map server: [ OK ]

[root@command init.d]#

[root@command init.d]# /etc/rc.d/init.d/ypxfrd status

rpc.ypxfrd (pid 7801) is running...

[root@command init.d]#

[root@command init.d]# ps -ef | grep ypxfrd

root 7801 1 0 22:49 ? 00:00:00 rpc.ypxfrd

root 7816 5553 0 22:49 pts/1 00:00:00 grep ypxfrd

[root@command init.d]#

 


102. 데몬 스크립트 파일 : /etc/rc.d/init.d/zebra

top



GNU하에서 개발된 Zebra라우팅 매니저 데몬을 실행하는 스크립트입니다. Zebra는 일종의 라우팅 데몬으로서 지원하는 프로토콜에는 RIPv1, RIPv2, RIPng, OSPF, OSPF6, BGP4+, BGP4-등이 있습니다. 이와 같은 Zebra 데몬을 실행하려면 이 스크립트를 사용하시면 됩니다.

사용옵션 : start|stop|restart|reload|condrestart|status

데몬파일 : /usr/sbin/zebra

설정파일 : /etc/zebra/zebra.conf

스크립트 사용예

[root@command init.d]# /etc/rc.d/init.d/zebra stop

Shutting down zebra: [ OK ]

[root@command init.d]#

[root@command init.d]# /etc/rc.d/init.d/zebra start

Starting zebra: [ OK ]

[root@command init.d]#

[root@command init.d]# /etc/rc.d/init.d/zebra restart

Shutting down zebra: [ OK ]

Starting zebra: [ OK ]

[root@command init.d]#

[root@command init.d]# /etc/rc.d/init.d/zebra status

zebra (pid 7906) is running...

[root@command init.d]#

[root@command init.d]# ps -ef | grep zebra

root 7906 1 0 22:51 ? 00:00:00 /usr/sbin/zebra -d

root 7922 5553 0 22:51 pts/1 00:00:00 grep zebra

[root@command init.d]#

 


마지막으로

top


지금까지 /etc/rc.d/init.d/디렉토리에 존재하는 리눅스 서비스데몬스크립트들에 대한 설명을 간략하게 하였습니다. 앞부분에서 말씀드린바와 같이 리눅스에는 수많은 서비스들이 존재합니다. 이들 서비스들을 모두 알아야하는 것은 아니겠지만 현재 사용되고 있는 용도에 대한 서비스는 정확하게 숙지하셔야 합니다.

 
copyright.gif

관련자료

댓글 0
등록된 댓글이 없습니다.

공지사항


뉴스광장


  • 현재 회원수 :  60,043 명
  • 현재 강좌수 :  35,853 개
  • 현재 접속자 :  98 명