中華技術學院 Linux 課程

Post on 31-Dec-2015

77 views 0 download

description

中華技術學院 Linux 課程. Chap one : Service Control 王俊城 RHCE/RHCX. Agenda. Service management System V-managed services xinetd. Service Management. init System V scripts direct command xinetd. Services Managed by init. Typically non-TCP/IP services Respawn capability - PowerPoint PPT Presentation

Transcript of 中華技術學院 Linux 課程

中華技術學院中華技術學院LinuxLinux 課程課程

Chap one : Service ControlChap one : Service Control王俊城王俊城RHCE/RHCXRHCE/RHCX

AgendaAgenda Service managementService management System V-managed servicesSystem V-managed services xinetdxinetd

Service ManagementService Management init init System V scriptsSystem V scripts direct command direct command xinetdxinetd

Services Managed by initServices Managed by init

Typically non-TCP/IP servicesTypically non-TCP/IP servicesRespawn capabilityRespawn capabilityConfigured in /etc/inittabConfigured in /etc/inittabinit qinit q

System V Service ManagementSystem V Service Management

/etc/rc.d/init.d/gpm start/etc/rc.d/init.d/gpm start /etc/init.d/gpm start/etc/init.d/gpm start service gpm startservice gpm start

chkconfigchkconfig chkconfig gpm --listchkconfig gpm --list

/etc/rc.d/rc?.d/*gpm/etc/rc.d/rc?.d/*gpm chkconfig gpm onchkconfig gpm on chkconfig gpm offchkconfig gpm off chkconfig gpm --delchkconfig gpm --del chkconfig gpm --addchkconfig gpm --add chkconfig telnet onchkconfig telnet on

/etc/xinetd.d/telnet/etc/xinetd.d/telnet

Xinetd Managed ServicesXinetd Managed Services xinetd xinetd standalone itself standalone itself

less-frequently needed servicesless-frequently needed serviceshost-based authenticationhost-based authenticationservice statistics and loggingservice statistics and loggingservice IP redirectionservice IP redirection

Replaces inetdReplaces inetd Linked with libwrap.soLinked with libwrap.so Configuration files:/etc/xinetd.conf,/etc/Configuration files:/etc/xinetd.conf,/etc/

xinetd.d/*xinetd.d/*

xinetd default controlsxinetd default controls /etc/xinetd.conf/etc/xinetd.conf

defaultsdefaults{{ instances = 60instances = 60 log_type = SYSLOG authprivlog_type = SYSLOG authpriv log_on_success = HOST PIDlog_on_success = HOST PID log_on_failure = HOSTlog_on_failure = HOST cps = 25 30cps = 25 30}}

includedir /etc/xinetd.dincludedir /etc/xinetd.d

xinetd service controlsxinetd service controls /etc/xinetd.d/*/etc/xinetd.d/*

service telnetservice telnet{{ flags = REUSEflags = REUSE socket_type = streamsocket_type = stream wait = nowait = no user = rootuser = root server = /usr/sbin/in.telnetdserver = /usr/sbin/in.telnetd log_on_failure += USERIDlog_on_failure += USERID disable = yesdisable = yes}}

LAB1-standalone serviceLAB1-standalone service

runlevelrunlevel init 3init 3 chkconfig gpm onchkconfig gpm on service gpm stop (X)service gpm stop (X) init 5 (V)init 5 (V) chkconfig gpm off (V)chkconfig gpm off (V) init 3 (X)init 3 (X) service gpm start (V)service gpm start (V) chkconfig gpm onchkconfig gpm on

LAB2-xinetdLAB2-xinetd

runlevelrunlevel init 3init 3 chkconfig telnet offchkconfig telnet off telnet localhost (X)telnet localhost (X) chkconfig telnet on (V)chkconfig telnet on (V) telnet localhost (V)telnet localhost (V) chkconfig telnet --listchkconfig telnet --list

T h an k Y ou !