1.7 xinetd守护进程(二)
1. 最高级的配置文件
/etc/xinetd.conf
最高级的配置文件/etc/xinetd.conf设有全局配置选项共享给所有管理服务。它也提供特殊服务配置的办法。以下是默认安装最高级配置文件的另一个版本。
defaults
{
# maximum number of requests the service may handle
instances = 60 (xinetd可以同时运行的最大进程数)
# type of logging this logs to a file that is specified
# or here sysloG syslog —facility [syslog —level]
log_type = SYSLOG authpriv (在log_type的设置中指定使用syslogd进行服务登记)
# 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 (指定成功时,登记客户机的IP地址和进程的PID。
# when the connection fails options as above
log_on_failure = HOST(当连接失败时,登记客户机IP地址和附加的客户机信息)
# 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守护进程(三)
1. 特殊服务的配置
/etc/xinetd.d/
以下是telnet的默认特殊服务配置文件,注意第一行(出现“注释”的)此值确定此服务是否被激活,两个服务配置实用程序,ntsysv和chkconfig,将编辑适当的xinetd服务配置文件为一个给定的运行级别。
# default:on (设定值为yes,表示当前不允许这项服务)
# 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 (设置值为REUSE,表示当中断或重启xinetd时,TCP/IP Socket可重用)
# service socket characteristics stream dgram etc
socket type =stream (设置值为stream,表示使用TCP的Socket类型)
# service socket characteristics single or multi —threaded
whail =no (设置值为no,表示为该项服务提供多线程功能)
# determine the owner of the server process
user =root (设置值为root,表示设置进程的UID)
# set the path of the service specific server process
server =/usr/sbin/in.telnetd (设置值为/usr/sbin/in.telnetd,这是该项服务程序的完整路径)
# logs the user id (RFC 1413) multi —threaded streams only
log_on_failure +=USERID (使用+=USERID,表示将失败的UID添加到系统登记表中)
# used by ntsysv or chkconfig to ehable or disable service
disable =yes (设定值为yes,表示当前不允许这项服务,可以使用ntsysv和chkconfig命令打开或关闭这项服务)