1.7 xinetd守護(hù)進(jìn)程(二)
1. 最高級(jí)的配置文件
/etc/xinetd.conf
最高級(jí)的配置文件/etc/xinetd.conf設(shè)有全局配置選項(xiàng)共享給所有管理服務(wù)。它也提供特殊服務(wù)配置的辦法。以下是默認(rèn)安裝最高級(jí)配置文件的另一個(gè)版本。
defaults
{
# maximum number of requests the service may handle
instances = 60 (xinetd可以同時(shí)運(yùn)行的最大進(jìn)程數(shù))
# type of logging this logs to a file that is specified
# or here sysloG syslog —facility [syslog —level]
log_type = SYSLOG authpriv (在log_type的設(shè)置中指定使用syslogd進(jìn)行服務(wù)登記)
# when the connection succeeds what xinetd logs
# PID logs the pid of the server processing the request
# Host logs the remote host’s ip address
# DURATTON logs the duration of the sesslon
log_on_success = HOST PID (指定成功時(shí),登記客戶機(jī)的IP地址和進(jìn)程的PID。
# when the connection fails options as above
log_on_failure = HOST(當(dāng)連接失敗時(shí),登記客戶機(jī)IP地址和附加的客戶機(jī)信息)
# if there are over 25 connection requests second stop
# accepting connections for 30 seconds
cps = 25 30
}
# All files within the /etc/xinetd.d director
# are also included in this configuration includedir /etc/xinetd.d
1.8 xinetd守護(hù)進(jìn)程(三)
1. 特殊服務(wù)的配置
/etc/xinetd.d/
以下是telnet的默認(rèn)特殊服務(wù)配置文件,注意第一行(出現(xiàn)“注釋”的)此值確定此服務(wù)是否被激活,兩個(gè)服務(wù)配置實(shí)用程序,ntsysv和chkconfig,將編輯適當(dāng)?shù)膞inetd服務(wù)配置文件為一個(gè)給定的運(yùn)行級(jí)別。
# default:on (設(shè)定值為yes,表示當(dāng)前不允許這項(xiàng)服務(wù))
# descriptioa:the telnet server server telnet sessions;it uses
# unencrypted username /passworn pairs for authentication
service telnet
# set to reuse options on the service socket
flags =REUSE (設(shè)置值為REUSE,表示當(dāng)中斷或重啟xinetd時(shí),TCP/IP Socket可重用)
# service socket characteristics stream dgram etc
socket type =stream (設(shè)置值為stream,表示使用TCP的Socket類型)
# service socket characteristics single or multi —threaded
whail =no (設(shè)置值為no,表示為該項(xiàng)服務(wù)提供多線程功能)
# determine the owner of the server process
user =root (設(shè)置值為root,表示設(shè)置進(jìn)程的UID)
# set the path of the service specific server process
server =/usr/sbin/in.telnetd (設(shè)置值為/usr/sbin/in.telnetd,這是該項(xiàng)服務(wù)程序的完整路徑)
# logs the user id (RFC 1413) multi —threaded streams only
log_on_failure +=USERID (使用+=USERID,表示將失敗的UID添加到系統(tǒng)登記表中)
# used by ntsysv or chkconfig to ehable or disable service
disable =yes (設(shè)定值為yes,表示當(dāng)前不允許這項(xiàng)服務(wù),可以使用ntsysv和chkconfig命令打開(kāi)或關(guān)閉這項(xiàng)服務(wù))