source: server/other/rsync/rsync-config.xml@ cce6b02e

10.0 10.1 11.0 11.1 11.2 6.0 6.1 6.2 6.2.0 6.2.0-rc1 6.2.0-rc2 6.3 6.3-rc1 6.3-rc2 6.3-rc3 7.10 7.4 7.5 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 krejzi/svn lazarus nosym perl-modules qt5new systemd-11177 systemd-13485 trunk upgradedb v5_0 v5_0-pre1 v5_1 v5_1-pre1 xry111/intltool xry111/soup3 xry111/test-20220226
Last change on this file since cce6b02e was cce6b02e, checked in by Larry Lawrence <larry@…>, 19 years ago

Chapter 23 intro

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@1182 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 2.6 KB
Line 
1<sect2>
2<title>Configuring <application>rsync</application></title>
3
4<sect3><title>Config files</title>
5
6<para><filename>/etc/rsyncd.conf</filename></para>
7<para>This is a simple download-only configuration. See the rsyncd man-page for
8additional options (i.e. user authentification).</para>
9
10<screen><userinput><command>cat &gt; /etc/rsyncd.conf &lt;&lt; "EOF"</command>
11# This is a basic rsync configuration file
12# It exports a single module without user authentification.
13
14motd file = /home/rsync/welcome.msg
15use chroot = yes
16
17[localhost]
18 path = /home/rsync
19 comment = Default rsync module
20 read only = yes
21 list = yes
22 uid = rsyncd
23 gid = rsyncd
24
25<command>EOF</command></userinput></screen>
26</sect3>
27
28<sect3><title>rsyncd init.d script</title>
29
30<para>Note that you only want to start the <application>rsync</application>
31server if you want to provide a <application>rsync</application> archive on
32your machine. The <application>rsync</application> client doesn't need this
33script to be used. Having said that, if you want to run the <application>rsync
34</application> daemon, the <command>rsyncd</command> init.d script can be
35created using the following commands:</para>
36
37<screen><userinput><command>cat &gt; /etc/rc.d/init.d/rsyncd &lt;&lt; "EOF"</command>
38#!/bin/sh
39# Begin $rc_base/init.d/rsyncd
40
41# Based on sysklogd script from LFS-3.1 and earlier.
42# Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org
43
44source /etc/sysconfig/rc
45source $rc_functions
46
47case "$1" in
48 start)
49 echo "Starting RSYNC Server..."
50 loadproc /usr/bin/rsync --daemon --compress
51 ;;
52
53 stop)
54 echo "Stopping RSYNC Server..."
55 killproc /usr/bin/rsync
56 ;;
57
58 reload)
59 echo "Reloading RSYNC Server..."
60 reloadproc /usr/bin/rsync
61 ;;
62
63 restart)
64 $0 stop
65 sleep 1
66 $0 start
67 ;;
68
69 status)
70 statusproc /usr/bin/rsync
71 ;;
72
73 *)
74 echo "Usage: $0 {start|stop|reload|restart|status}"
75 exit 1
76 ;;
77esac
78
79# End $rc_base/init.d/rsyncd
80<command>EOF
81chmod 755 /etc/rc.d/init.d/rsyncd</command></userinput></screen>
82
83<para>Create the symbolic links to this file in the relevant
84<filename class="directory">rc.d</filename> directories with the following
85commands:</para>
86<screen><userinput><command>cd /etc/rc.d/init.d &amp;&amp;
87ln -sf ../init.d/rsyncd ../rc0.d/K30rsyncd &amp;&amp;
88ln -sf ../init.d/rsyncd ../rc1.d/K30rsyncd &amp;&amp;
89ln -sf ../init.d/rsyncd ../rc2.d/K30rsyncd &amp;&amp;
90ln -sf ../init.d/rsyncd ../rc3.d/S30rsyncd &amp;&amp;
91ln -sf ../init.d/rsyncd ../rc4.d/S30rsyncd &amp;&amp;
92ln -sf ../init.d/rsyncd ../rc5.d/S30rsyncd &amp;&amp;
93ln -sf ../init.d/rsyncd ../rc6.d/K30rsyncd</command></userinput></screen>
94
95</sect3>
96
97</sect2>
98
Note: See TracBrowser for help on using the repository browser.