【范例1?????ont-family: Arial">】/etc/xinetd.conf
# Simple configuration file for xinetd
# Some defaults, and include /etc/xinetd.d/
defaults
{
instances = 60
log_type = SYSLOG authpriv??捳楲瑰>?????SPAN>
log_on_success = HOST PID
log_on_failure = HOST
cps = 25 30
}
includedir /etc/xinetd.d
解读:RedHat 7.x建议的配置方法不是将所有服务项都写在一个文件里面,/etc/xinetd.conf是作为默认配置文件用的,/etc/xinetd.d目录下面的每个文件对应一个服务。前面说过,默认项的设置是作用于所有服务的,由此可以看出上面的对所有服务都是设置了60个实例 设置的日志方式为SYSLOG authpriv,登陆成功时记录HOST和PID,失败时仅记录HOST,
每秒最多处理25个连接,如果超过这个数目的连接则等待30秒后继续处理。Includedir指令指定了配置文件的目录是/etc/xinetd.d
2.telnet的配置
【范例1?????ILY: 宋体; mso-ascii-font-family: Arial; mso-bidi-font-family: Arial; mso-hansi-font-family: Arial">】/etc/xinetd.d/telnet
# default: on
# description: The telnet server serves telnet sessions; it uses \
# unencrypted username/password pairs for authentication.
service telnet
{
disable = no
flags = R??捳楲瑰>?????EUSE
socket_type = stream
wait = no
user = root
instances = 10
server = /usr/sbin/in.telnetd
log_on_failure += USERID
????? style="COLOR: maroon; FONT-FAMILY: Arial"> rlimit_as = 8M
rlimit_cpu=20
}
解读:
1 instances的设置覆盖了defaults项的设置;
2 log_on_failure属性在defaults项的基础上加上了USERID。
3 对TELNET服务设置了资源限制,最多可用内存为8M,CPU每秒处理20个进程。