mirror of
https://github.com/Zeckmathederg/glfs.git
synced 2025-02-05 16:07:23 +08:00
e80cc95c31
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@865 af4574ff-66df-0310-9fd7-8a98e5e911e0
78 lines
2.5 KiB
XML
78 lines
2.5 KiB
XML
<sect2>
|
|
<title>Configuring xinetd</title>
|
|
<para>Create the <filename>xinetd.conf</filename> file with the following commands: </para>
|
|
|
|
<para><screen><userinput>cp /etc/xinetd.conf /etc/xinetd.conf.bak
|
|
sed -e 's/etc/sbin/g' xinetd/sample.conf > /etc/xinetd.conf</userinput></screen></para>
|
|
|
|
<sect3><title>Config files</title>
|
|
<para><filename>/etc/xinetd.conf</filename></para>
|
|
|
|
<para>Create the xinetd boot script:</para>
|
|
<para><screen><userinput>cat > /etc/rc.d/init.d/xinetd << "EOF"</userinput>
|
|
#!/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
|
|
<userinput>EOF</userinput></screen></para>
|
|
|
|
<para>Add the run level symlinks:</para>
|
|
|
|
<para><screen><userinput>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
|
|
</userinput></screen></para>
|
|
|
|
<para>Now, we'll use our new boot script to start xinetd: </para>
|
|
<para><screen><userinput>/etc/rc.d/init.d/xinetd start</userinput></screen></para>
|
|
|
|
<para>Checking the <filename>/var/log/daemon.log</filename> file
|
|
should prove quite entertaining. This file may contain entries
|
|
similar to the following: </para>
|
|
|
|
<para><screen><userinput>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]</userinput></screen></para>
|
|
|
|
<para>These errors are due to the fact that we don't have most of the
|
|
servers that xinetd is trying to control installed yet.</para></sect3>
|
|
</sect2>
|
|
|