service service-name { Socket_type = xxx; //TCP/IP socket type,such as stream,dgram,raw,.... protocol = xxx; //服务使用的协议 Server = xxx; //服务daemon的完整路径 Server_args = xxx; //服务的参数 Port = xxx; //指定服务的端口号 Wait = xxx; //是否阻塞服务,即单线程或多线程 User = xxx; //服务进程的uid Group = xxx; //gid REUSE = xxx; //可重用标志 Disabled = yes/no; //是否禁用 ......
}
我们以ftp和telnet为例,说明配置过程。 在/etc/xinetd.d目录下,编辑ftp和telnet ftp如下: service proftpd { disable = no port = 21 socket_type = stream protocol = tcp user = root server = /usr/local/sbin/in.proftpd wait = no }
telnet如下: Service telnetd { disable = no port = 23 Socket_type=stream protocol=tcp wait=tcp user=root server=/usr/sbin/in.telnetd }