glfs/server/other/rsync/rsync-config.xml
Larry Lawrence 46cef72518 add rsync-2.5.6
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@1009 af4574ff-66df-0310-9fd7-8a98e5e911e0
2003-08-31 14:39:34 +00:00

97 lines
2.5 KiB
XML

<sect2>
<title>Configuring <application>rsync</application></title>
<sect3><title>Config files</title>
<para><filename>/etc/rsyncd.conf</filename></para>
<para>This is a simple download-only configuration. See the rsyncd man-page for
additional options (i.e. user authentification).</para>
<para><screen><userinput><command>cat &gt; /etc/rsyncd.conf &lt;&lt; "EOF"</command>
# This is a basic rsync configuration file
# It exports a single module without user authentification.
motd file = /home/rsync/welcome.msg
use chroot = yes
[localhost]
path = /home/rsync
comment = Default rsync module
read only = yes
list = yes
uid = rsyncd
gid = rsyncd
<command>EOF</command></userinput></screen></para>
</sect3>
<sect3><title>rsyncd init.d script</title>
<para>Note that you only want to start the rsync server if you want to provide
a rsync archive on your machine. The rsync client doesn't need this script to be
sed. Having said that, if you want to run the rsync daemon, the rsyncd
init.d script can be created using the following commands:</para>
<para><screen><userinput><command>cat &gt; /etc/rc.d/init.d/rsyncd &lt;&lt; "EOF"</command>
#!/bin/sh
# Begin $rc_base/init.d/rsyncd
# 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 RSYNC Server..."
loadproc /usr/bin/rsync --daemon --compress
;;
stop)
echo "Stopping RSYNC Server..."
killproc /usr/bin/rsync
;;
reload)
echo "Reloading RSYNC Server..."
reloadproc /usr/bin/rsync
;;
restart)
$0 stop
sleep 1
$0 start
;;
status)
statusproc /usr/bin/rsync
;;
*)
echo "Usage: $0 {start|stop|reload|restart|status}"
exit 1
;;
esac
# End $rc_base/init.d/rsyncd
<command>EOF
chmod 755 /etc/rc.d/init.d/rsyncd</command></userinput></screen></para>
<para>Create the symbolic links to this file in the relevant
<filename class="directory">rc.d</filename> directories with the following
commands:
<screen><userinput><command>cd /etc/rc.d/init.d &amp;&amp;
ln -sf ../init.d/rsyncd ../rc0.d/K30rsyncd &amp;&amp;
ln -sf ../init.d/rsyncd ../rc1.d/K30rsyncd &amp;&amp;
ln -sf ../init.d/rsyncd ../rc2.d/K30rsyncd &amp;&amp;
ln -sf ../init.d/rsyncd ../rc3.d/S30rsyncd &amp;&amp;
ln -sf ../init.d/rsyncd ../rc4.d/S30rsyncd &amp;&amp;
ln -sf ../init.d/rsyncd ../rc5.d/S30rsyncd &amp;&amp;
ln -sf ../init.d/rsyncd ../rc6.d/K30rsyncd</command></userinput></screen></para>
</sect3>
</sect2>