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

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

작성자 정보

  • 웹관리자 작성
  • 작성일

컨텐츠 정보

본문

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

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


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


20. 데몬 스크립트 파일 : /etc/rc.d/init.d/functions

top


리눅스 시스템의 /etc/rc.d/init.d/디렉토리내의 거의 모든 쉘 스크립트에서 사용되어지는 함수를 내장하고 있는 파일입니다.


21. 데몬 스크립트 파일 : /etc/rc.d/init.d/gpm

top



GPMMidnight Commander와 같은 텍스트기반의 리눅스 어플리케이션에서 마우스의 복사 및 붙이기 기능과 콘솔상에서의 마우스 팝업기능을 제공하기 위한 데몬입니다.

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

프로세스명 : gpm

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

설정파일 : /etc/sysconfig/mouse

데몬파일 : /usr/sbin/gpm

마우스설정파일 : MOUSECFG=/etc/sysconfig/mouse


스크립트 사용예

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

Shutting down console mouse services: [ OK ]

[root@command init.d]#

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

Starting console mouse services: [ OK ]

[root@command init.d]#

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

Shutting down console mouse services: [ OK ]

Starting console mouse services: [ OK ]

[root@command init.d]#

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

gpm (pid 4470) is running...

[root@command init.d]#

[root@command init.d]#

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

root 4470 1 0 12:26 ? 00:00:00 gpm -t ps/2 -m /dev/psaux

root 4485 2007 0 12:26 pts/0 00:00:00 grep gpm

[root@command init.d]#

 

22. 데몬 스크립트 파일 : /etc/rc.d/init.d/halt

top


halt는 시스템이 런레벨(runlevel) 0또는 런레벨(runlevel)6로 실행이 될 때에 init 프로세스에 의해 실행되는 스크립트로서 현재 시스템에 실행된 모든 프로세스를 죽이고 모든 파일시스템의 마운트를 해제한 후에 시스템을 종료(halt)시키거나 재부팅(reboot)합니다.

명령어위치 : /sbin/halt


23. 데몬 스크립트 파일 : /etc/rc.d/init.d/hpoj

top


이 스크립트는 /usr/sbin/ptal-init데몬을 실행시키는 스크립트입니다. ptal-initHP OfficeJet을 위한 리눅스 드라이브 유틸리티 셋업 디바이스와 초기화 스크립트입니다. 반드시 프린트 스풀러인 lpd또는 CUPS가 시작된 후에 실행해야 합니다.


24. 데몬 스크립트 파일 : /etc/rc.d/init.d/httpd

top


여러분들도 잘 아시는 아파치 웹서버 데몬인 httpd를 실행시키는 데몬스크립트입니다. RPM 패키지로 설치되어 있는 아파치를 이 스크립트를 이용하여 간단히 시작시키거나 종료시킬 수 있습니다.

사용옵션 : start|stop|restart|condrestart|reload|status|fullstatus|graceful|help|configtest

데몬파일 : /usr/sbin/httpd

프로세스명 : httpd

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

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

설정디렉토리 : /etc/httpd/

로그디렉토리 : /var/log/httpd/

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

아파치 데몬컨트롤 명령어 : /usr/sbin/apachectl

스크립트 사용예

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

Stopping httpd: [ OK ]

[root@command init.d]#

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

Starting httpd: [ OK ]

[root@command init.d]#

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

Stopping httpd: [ OK ]

Starting httpd: [ OK ]

[root@command init.d]#

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

httpd (pid 4655 4654 4653 4652 4651 4650 4649 4648 4645) is running...

[root@command init.d]#

[root@command init.d]#

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

root 4645 1 5 12:55 ? 00:00:00 /usr/sbin/httpd

apache 4648 4645 0 12:55 ? 00:00:00 [httpd]

apache 4649 4645 0 12:55 ? 00:00:00 [httpd]

apache 4650 4645 0 12:55 ? 00:00:00 [httpd]

apache 4651 4645 0 12:55 ? 00:00:00 [httpd]

apache 4652 4645 0 12:55 ? 00:00:00 [httpd]

apache 4653 4645 0 12:55 ? 00:00:00 [httpd]

apache 4654 4645 0 12:55 ? 00:00:00 [httpd]

apache 4655 4645 0 12:55 ? 00:00:00 [httpd]

root 4668 2007 0 12:56 pts/0 00:00:00 grep httpd

[root@command init.d]#

[root@command init.d]# /etc/rc.d/init.d/httpd fullstatus

Object not found!

The requested URL was not found on this server. The link on the

referring page seems to be wrong or outdated. Please inform the

author of that page about the error.

If you think this is a server error, please contact the webmaster

Error 404

localhost

Tue 10 Feb 2004 12:59:38 PM KST

Apache/2.0.40 (Red Hat Linux)

[root@command init.d]#

[root@command init.d]# /etc/rc.d/init.d/httpd gracefule

Usage: httpd {start|stop|restart|condrestart|reload|status|fullstatus|graceful|help|configtest}

[root@command init.d]#

[root@command init.d]#

[root@command init.d]# /etc/rc.d/init.d/httpd help

Usage: /usr/sbin/httpd [-D name] [-d directory] [-f file]

[-C "directive"] [-c "directive"]

[-k start|restart|graceful|stop]

[-v] [-V] [-h] [-l] [-L] [-t]

Options:

-D name : define a name for use in <IfDefine name> directives

-d directory : specify an alternate initial ServerRoot

-f file : specify an alternate ServerConfigFile

-C "directive" : process directive before reading config files

-c "directive" : process directive after reading config files

-e level : show startup errors of level (see LogLevel)

-E file : log startup errors to file

-v : show version number

-V : show compile settings

-h : list available command line options (this page)

-l : list compiled in modules

-L : list available configuration directives

-t -D DUMP_VHOSTS : show parsed settings (currently only vhost settings)

-t : run syntax check for config files

[root@command init.d]#

[root@command init.d]# /etc/rc.d/init.d/httpd configtest

Syntax OK

[root@command init.d]#

 


25. 데몬 스크립트 파일 : /etc/rc.d/init.d/identd

top


identdTCP/IPident 프로토콜 서버입니다. 그리고 identd스크립트는 RFC 1413 Document에 정의되어 있는 identd 서버(데몬)을 시작시키거나 종료시키는 스크립트입니다. identd 서버는 TCP/IP로 연결되어 있는 사용자 식별을 위한 프토콜입니다.

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

프로세스명 : identd

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

설정파일 : /etc/identd.conf

기타 : /var/lock/subsys/identd

스크립트 사용예

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

Stopping identd: [ OK ]

[root@command init.d]#

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

Starting identd: [ OK ]

[root@command init.d]#

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

Stopping identd: [ OK ]

Starting identd: [ OK ]

[root@command init.d]#

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

identd (pid 4833) is running...

[root@command init.d]#

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

ident 4833 1 0 13:12 ? 00:00:00 [identd]

root 4846 2007 0 13:12 pts/0 00:00:00 grep ident

[root@command init.d]#


26. 데몬 스크립트 파일 : /etc/rc.d/init.d/innd

top


innd는 가장 많이 사용되는 인기있는 인터넷 뉴스서버, USENET 서버데몬입니다. 따라서 이 스크립트는 인터넷뉴스서버인 USENET을 실행시키고 종료시키는 스크립트입니다.

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

프로세스명 : innd

PID파일 : /var/run/news/innd.pid

관련디렉토리 : /etc/news

설정파일 : /etc/news/inn.conf

관련파일 : /etc/rc.news


27. 데몬 스크립트 파일 : /etc/rc.d/init.d/ip6tables

top


ip6tablesIpv6를 위한 패킷필터링 관리도구입니다. , /etc/sysconfig/iptables에 정의된 룰에 따라서 리눅스 방화벽을 실행 및 중지하기위한 스크립트입니다. , iptables로 구현된 방화벽으로서 패킷필터링(packet filtering)을 하기 위한 것입니다.

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

설정파일 : /etc/sysconfig/ip6tables


28. 데몬 스크립트 파일 : /etc/rc.d/init.d/ipchains

top


ipchains/etc/sysconfig/ipchains에 정의된 룰에 따라서 리눅스 방화벽을 실행하거나 중지하는 스크립트입니다. , ipchains로 구현하는 패킷 필터링(packet filtering) 방화벽도구입니다. 현재 ipchainsiptables에 의해 대체되고 있습니다. 따라서 ipchains를 사용하셔야한다면 iptables를 이용하시는 것이 좋습니다.

사용옵션 : start|stop|restart|status|panic|save

설정파일 : /etc/sysconfig/ipchains


29. 데몬 스크립트 파일 : /etc/rc.d/init.d/iptables

top


iptables/etc/sysconfig/iptables에 미리 정의된 룰에 따라서 리눅스 서버의 방화벽을 실행 및 중지하기 위한 스크립트입니다. , iptables로 구현하는 패킷필터링(packet filtering)방화벽입니다.

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

설정파일 : /etc/sysconfig/iptables

스크립트 사용예

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

Flushing all chains:[ OK ]

Removing user defined chains:[ OK ]

Resetting built-in chains to the default ACCEPT policy:[ OK ]

[root@command init.d]#

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

Flushing all current rules and user defined chains:[ OK ]

Clearing all current rules and user defined chains:[ OK ]

Applying iptables firewall rules: [ OK ]

[root@command init.d]#

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

Flushing all current rules and user defined chains:[ OK ]

Clearing all current rules and user defined chains:[ OK ]

Applying iptables firewall rules: [ OK ]

[root@command init.d]#

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

Table: filter

Chain INPUT (policy ACCEPT)

target prot opt source destination

RH-Lokkit-0-50-INPUT all -- anywhere anywhere

Chain FORWARD (policy ACCEPT)

target prot opt source destination

RH-Lokkit-0-50-INPUT all -- anywhere anywhere

Chain OUTPUT (policy ACCEPT)

target prot opt source destination

Chain RH-Lokkit-0-50-INPUT (2 references)

target prot opt source destination

ACCEPT all -- anywhere anywhere

REJECT tcp -- anywhere anywhere tcp dpts:0:1023 flags:SYN,RST,ACK/SYN reject-with icmp-port-unreachable

REJECT tcp -- anywhere anywhere tcp dpt:nfs flags:SYN,RST,ACK/SYN reject-with icmp-port-unreachable

REJECT udp -- anywhere anywhere udp dpts:0:1023 reject-with icmp-port-unreachable

REJECT udp -- anywhere anywhere udp dpt:nfs reject-with icmp-port-unreachable

REJECT tcp -- anywhere anywhere tcp dpts:x11:6009 flags:SYN,RST,ACK/SYN reject-with icmp-port-unreachable

REJECT tcp -- anywhere anywhere tcp dpt:xfs flags:SYN,RST,ACK/SYN reject-with icmp-port-unreachable

[root@command init.d]#

 


30. 데몬 스크립트 파일 : /etc/rc.d/init.d/irda

top


IrDA (Infrared Data Association)데몬 스크립트로서 IrDA는 무선통신, 적외선 통신을 위한 산업표준입니다. IrDA는 최근 거의 모든 장치들(laptops, LAN아답터, PDA, 프린터, 휴대폰등)에 사용될 수 있으며 9600bps에서 4Mbps의 속도범위를 가집니다.

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

 

스크립트 사용예

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

Starting IrDA: [ OK ]

[root@command init.d]#

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

Shutting down IrDA: [FAILED]

[root@command init.d]#

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

Shutting down IrDA: [FAILED]

Starting IrDA: [ OK ]

[root@command init.d]#

 


31. 데몬 스크립트 파일 : /etc/rc.d/init.d/irqbalance

top


irqbalance데몬을 시작하거나 종료하는 스크립트입니다. irqbalance데몬은 부하분산을 하기위한 목적으로 두개 이상의 CPU를 가진 다중프로세스 시스템상에서 특정 CPU에 대한 인터럽트를 분배하기 위한 데몬입니다.

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

데몬파일 : /usr/sbin/irqbalance

스크립트 사용예

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

Stopping irqbalance: [ OK ]

[root@command init.d]#

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

Starting irqbalance: [ OK ]

[root@command init.d]#

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

irqbalance (pid 5501) is running...

[root@command init.d]#

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

Stopping irqbalance: [ OK ]

Starting irqbalance: [ OK ]

[root@command init.d]#

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

root 5 1 0 09:14 ? 00:00:01 [ksoftirqd_CPU0]

root 6 1 0 09:14 ? 00:00:00 [ksoftirqd_CPU1]

root 5521 1 0 15:11 ? 00:00:00 irqbalance

root 5524 2007 0 15:11 pts/0 00:00:00 grep irq

[root@command init.d]#

 


32. 데몬 스크립트 파일 : /etc/rc.d/init.d/iscsi

top



iSCSI 데몬 스크립트입니다.

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

설정파일 : /etc/iscsi.conf

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

스크립트 사용예

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

iscsiD] iSCSI: umount iscsid[ OK ]

[root@command init.d]#

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

Starting iSCSI: iscsi iscsid

[root@command init.d]#

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

iscsiD] iSCSI: umount iscsid[ OK ]

Starting iSCSI: iscsi iscsid

[root@command init.d]#

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

iscsid (pid 5634) is running...

[root@command init.d]#

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

root 5681 1 0 15:18 ? 00:00:00 iscsid -l /dev/iscsi -m 755

root 5686 2007 0 15:18 pts/0 00:00:00 grep iscsi

[root@command init.d]#

 


33. 데몬 스크립트 파일 : /etc/rc.d/init.d/isdn

top


isdn 서비스를 시작하거나 종료하는 스크립트입니다.

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


34. 데몬 스크립트 파일 : /etc/rc.d/init.d/isicom

top


MULTItech ISI(Intelligent Serial Interface)카드에 대한 드라이브와 펌웨어(firmware)를 로드하는 스크립트입니다. MULTItech ISI시리얼카드는 원격 액세스 서버에 대한 추가적인 시리얼포트를 제공합니다.

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


35. 데몬 스크립트 파일 : /etc/rc.d/init.d/kadmin

top


Kerberos 5 관리데몬을 시작시키거나 종료시키는 스크립트입니다. Kerberos 5는 신뢰할 수 있는 3rd파티(third-party) 인증 데몬입니다. 이 스크립트는 마스트서버 측에서만 실행된 Kerberos 5관리 데몬을 컨트롤하는 스크립트입니다.

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

데몬파일 : /usr/kerberos/sbin/kadmind


36. 데몬 스크립트 파일 : /etc/rc.d/init.d/kdcrotate

top


/etc/krb5.conf에 정의되어 있는 KDC 리스트를 회전시키는 스크립트입니다.

스크립트 사용예

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

Rotating KDC list [ OK ]

[root@command init.d]#

 


37. 데몬 스크립트 파일 : /etc/rc.d/init.d/keytable

top


/etc/sysconfig/keyboard 파일에 설정되어 있는대로 키보드맵(keyboard map)을 로드하는 스크립트입니다. 키보드 설정유틸리티인 kbdconfig를 사용하여 선택될 수도 있으며 대부분의 시스템에서 사용가능하도록 해 두어야합니다.

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

설정파일 : /etc/sysconfig/keyboard


38. 데몬 스크립트 파일 : /etc/rc.d/init.d/killall

top


현재 실행중인 서비스들을 대상으로 모두 중지시키는 스크립트입니다. 따라서 이 스크립트는 주로 시스템을 중지하거나 재시작할 때에 실행되는 스크립트입니다.

아래는 /etc/rc.d/init.d/killall을 실행한 예로서 이 스크립트가 실행되면 시스템이 중지하게 되므로 서비스중인 시스템에서는 주의하시기 바랍니다.

스크립트 사용예

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

Stopping amd: [ OK ]

Stopping arpwatch: [ OK ]

[ OK ] down AppleTalk services: [ OK ]

Stopping atd: [ OK ]

Shutting down Bluetooth: [FAILED]

Stopping Canna server: [ OK ]

Stopping crond: [ OK ]

Stopping cups: [ OK ]

Shutting down FreeWnn: [ OK ]

Shutting down console mouse services: [ OK ]

Stopping httpd: [ OK ]

Stopping identd: [ OK ]

Flushing all chains:[ OK ]

Removing user defined chains:[ OK ]

Resetting built-in chains to the default ACCEPT policy:[ OK ]

Shutting down IrDA: [FAILED]

iscsiD] iSCSI: umount iscsid[ OK ]


39. 데몬 스크립트 파일 : /etc/rc.d/init.d/kprop

top


Kerberos 5 클라이언트를 시작하거나 중지시키는 스크립트입니다.

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

데몬파일 : /usr/kerberos/sbin/kpropd


40. 데몬 스크립트 파일 : /etc/rc.d/init.d/krb524

top


krb524서비스를 시작시키거나 종료시키는 스크립트입니다. krb524서비스는 Kerberos 5인증서를 Kerberos 4인증서로 변환하는 서비스입니다.

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

데몬파일 : /usr/kerberos/sbin/krb524d


41. 데몬 스크립트 파일 : /etc/rc.d/init.d/krb5kdc

top


Kerberos 5 서버를 시작하거나 종료시키는 스크립트입니다. , 인증서를 획득하기 위하여 연결을 시도하는 Kerberos 4Kerberos 5 클라이언트들을 위하여 Kerberos 5서버를 시작시키거나 종료하는 스크립트입니다.

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

데몬파일 : /usr/kerberos/sbin/krb5kdc


 
copyright.gif

관련자료

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

공지사항


뉴스광장


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