xinetd-2.3.10

Introduction to xinetd

Download location (HTTP):       http://www.xinetd.org/xinetd-2.3.10.tar.gz
Download location (FTP):        
Version used:                   2.3.10
Package size:                   300 KB
Estimated Disk space required:  1.2 MB

xinetd is the eXtended InterNET services Daemon, a secure replacement for inetd.

Installation of xinetd

Install xinetd by running the following commands:

./configure --prefix=/usr &&
make &&
make install

Installation command explanations

./configure --prefix=/usr : Change the default installation directory of /usr/local.

Configuring xinetd

Create the xinetd.conf file with the following commands:

cp /etc/xinetd.conf /etc/xinetd.conf.bak
sed -e 's/etc/sbin/g' xinetd/sample.conf > /etc/xinetd.conf

Config files

/etc/xinetd.conf

Create the xinetd boot script:

cat > /etc/rc.d/init.d/xinetd << "EOF"
#!/bin/bash
# Begin $rc_base/init.d/xinetd
# Based on sysklogd script from LFS-3.1 and earlier.
# Rewritten by Gerard Beekmans  - gerard@linuxfromscratch.org
source /etc/sysconfig/rc
source $rc_functions
case "$1" in
	start)
		echo "Starting xinetd..."
		loadproc /usr/sbin/xinetd
		;;
	stop)
		echo "Stopping xinetd..."
		killproc /usr/sbin/xinetd
		;;
	reload)
		echo "Reloading xinetd..."
		killall -HUP xinetd
		;;
	restart)
		$0 stop
		sleep 1
		$0 start
		;;
	status)
		statusproc /usr/sbin/xinetd
		;;
	*)
		echo "Usage: $0 {start|stop|reload|restart|status}"
		exit 1
		;;
esac
# End $rc_base/init.d/xinetd
EOF

Add the run level symlinks:

chmod 754 /etc/rc.d/init.d/xinetd &&
ln -s  /etc/rc.d/init.d/xinetd /etc/rc.d/rc0.d/K49xinetd &&
ln -s  /etc/rc.d/init.d/xinetd /etc/rc.d/rc1.d/K49xinetd &&
ln -s  /etc/rc.d/init.d/xinetd /etc/rc.d/rc2.d/K49xinetd &&
ln -s  /etc/rc.d/init.d/xinetd /etc/rc.d/rc3.d/S23xinetd &&
ln -s  /etc/rc.d/init.d/xinetd /etc/rc.d/rc4.d/S23xinetd &&
ln -s  /etc/rc.d/init.d/xinetd /etc/rc.d/rc5.d/S23xinetd &&
ln -s  /etc/rc.d/init.d/xinetd /etc/rc.d/rc6.d/K49xinetd

Now, we'll use our new boot script to start xinetd:

/etc/rc.d/init.d/xinetd start

Checking the /var/log/daemon.log file should prove quite entertaining. This file may contain entries similar to the following:

Aug 22 21:40:21 dps10 xinetd[2696]: Server /usr/sbin/in.rlogind is not
executable [line=29]
Aug 22 21:40:21 dps10 xinetd[2696]: Error parsing attribute server -
DISABLING SERVICE [line=29]
Aug 22 21:40:21 dps10 xinetd[2696]: Server /usr/sbin/in.rshd is not
executable [line=42]

These errors are due to the fact that we don't have most of the servers that xinetd is trying to control installed yet.

Configuration command explanations

cp /etc/xinetd.conf /etc/xinetd.conf.bak : Save the current xinetd.conf file, if it exists.

sed -e 's/etc/sbin/g' xinetd/sample.config > /etc/xinetd.conf : insure the path to all daemons is /usr/sbin, rather than the default path of /usr/etc.

ln -s /etc/rc.d/init.d/xinetd /etc/rc.d/rc3.d/S23xinetd : Create the xinetd runlevel symlinks to the xinetd boot script, used to start and stop xinetd automatically on machine startup and shutdown.

The format of the /etc/xinetd.conf is documented in the xinetd.conf man page. Further information can be found at http://www.xinetd.org.

Contents

The xinetd package contains xinetd, itox and xconv.pl.

Description

xinetd

xinetd is the internet services daemon.

itox

itox is a utility used for converting inetd.conf files to xinetd.conf format.

xconv.pl

xconv.pl is a perl script used for converting inetd.conf files to xinetd.conf format, similar to itox.