mirror of
https://github.com/Zeckmathederg/glfs.git
synced 2025-01-27 18:02:12 +08:00
cce6b02e1c
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@1182 af4574ff-66df-0310-9fd7-8a98e5e911e0
97 lines
3.1 KiB
XML
97 lines
3.1 KiB
XML
<sect2>
|
|
<title>Configuring <application>xinetd</application></title>
|
|
|
|
<sect3><title>Config files</title>
|
|
|
|
<para><filename>/etc/xinetd.conf</filename></para>
|
|
|
|
</sect3>
|
|
|
|
<sect3><title>Configuration Information</title>
|
|
|
|
<para>Create the <filename>xinetd.conf</filename> file with the following commands:</para>
|
|
|
|
<screen><userinput><command>cp /etc/xinetd.conf /etc/xinetd.conf.bak</command></userinput></screen>
|
|
|
|
<para>Insure the path to all daemons is <filename
|
|
class="directory">/usr/sbin</filename>, rather than the default path of
|
|
<filename class="directory">/usr/etc</filename>:</para>
|
|
|
|
<screen><userinput><command>sed -e 's/etc/sbin/g' xinetd/sample.conf > /etc/xinetd.conf</command>
|
|
</userinput></screen>
|
|
|
|
<para>The format of the <filename>/etc/xinetd.conf</filename> is
|
|
documented in the xinetd.conf man page. Further information can be
|
|
found at <ulink url="http://www.xinetd.org"/>.</para>
|
|
|
|
<para>Create the <command>xinetd</command> boot script:</para>
|
|
|
|
<screen><userinput><command>cat > /etc/rc.d/init.d/xinetd << "EOF"</command>
|
|
#!/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
|
|
<command>EOF
|
|
chmod 754 /etc/rc.d/init.d/xinetd</command></userinput></screen>
|
|
|
|
<para>Add the run level symlinks:</para>
|
|
|
|
<screen><userinput><command>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</command></userinput></screen>
|
|
|
|
<para>Now, we'll use our new boot script to start <command>xinetd</command>: </para>
|
|
|
|
<screen><userinput><command>/etc/rc.d/init.d/xinetd start</command></userinput></screen>
|
|
|
|
<para>Checking the <filename>/var/log/daemon.log</filename> file
|
|
should prove quite entertaining. This file may contain entries
|
|
similar to the following:</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>These errors are due to the fact that we don't have most of the
|
|
servers that <command>xinetd</command> is trying to control installed yet.</para>
|
|
|
|
</sect3>
|
|
|
|
</sect2>
|