Книга: Fedora™ Unleashed, 2008 edition

Running Services Through xinetd

Running Services Through xinetd

The xinetd daemon is a replacement for inetd; it listens for requests for services on certain ports and starts those services as required. xinetd is called a super server because it controls other servers. Its purpose is to conserve resources by not running services when not needed. The xinetd daemon is more secure than the older inetd, offers better logging facilities than inetd, and can redirect service requests to another machine. It does not require the root user to start any services.

The configuration file for xinetd is found at /etc/xinetd.conf; configuration files for individual services are located in /etc/xinet.d/; the particulars of its format are covered in the man page for xinetd.conf, which also provides a sample file listing. Fedora provides the appropriate server RPM packages already configured to use xinetd if possible. If you are installing servers manually from source code, the included documentation describes the appropriate xinetd configuration. Services run under xinetd cannot be started and stopped in the same manner as the services run from scripts in /etc/rc.d/init.d; you must restart the xinetd service itself and let it control those services.

Here is a sample listing of the rsync file /etc/xinet.d/rsync:

# default: off
# description: The rsync server is a good addition to an ftp server, as it
#  allows crc checksumming etc.
service rsync {
 disable = yes
 socket_type    =  stream
 wait           =  no
 user           =  root
 server         =  /usr/bin/rsync
 server_args    =  --daemon
 log_on_failure += USERID
}

The items are straightforward and vary from service to service. Although you can edit this by hand, it can be configured via the command line or graphical service configuration clients.

Оглавление книги


Генерация: 1.306. Запросов К БД/Cache: 3 / 0
поделиться
Вверх Вниз