LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   rsync daemon (https://www.linuxquestions.org/questions/red-hat-31/rsync-daemon-326705/)

hverne 05-24-2005 04:01 PM

rsync daemon
 
I want to starup rsync as a daemon.
I tried "rsync --daemon", no error message but ps could not find it.
Here is what I do know.
1. /etc/xinetd.d/rsync does exist (I changed disble to = no)
2. /us/bin/rsync executable exists.
3. there is no entry in /etc/rc.d/init.d for rsync(d)
4. rsync(d).conf does not exist.
5. using latest redhat version of rsync (2.6.3)
6. kernel 2.6.11-1.14_FC3
I
nterestingly enough, I have rsync working fine on my windows machines, using cygwin. I am having troubles with Fedora!

TIA
Help!

misc 06-01-2005 12:34 PM

First of all, note that there is a "Fedora" forum here at linuxquestions.org. The "Red Hat" forum is for Red Hat Enterprise Linux and old Red Hat Linux.

You don't need a separate rsync daemon, because the rsync server is driven by the Internet services daemon xinetd. Instead of editing /etc/xinetd.d/rsync yourself, you would simply run "chkconfig rsync on" and configure rsync (read "man rsyncd.conf"). That is, you must create the rsyncd.conf file. When xinetd is active and running, it would start rsync for incoming connections. If it is not running already, "chkconfig xinetd on ; service xinetd start" enables and starts it.

bramhastra 06-02-2005 04:53 AM

LAUNCHING THE RSYNC DAEMON

This is how to go

The rsync daemon is launched by specifying the --daemon option to rsync.

The daemon must run with root privileges if you wish to use chroot, to bind to a port numbered under 1024 (as is the default 873), or to set file ownership. Otherwise, it must just have permission to read and write the appropriate data, log, and lock files.

You can launch it either via inetd, as a stand-alone daemon, or from an rsync client via a remote shell. If run as a stand-alone daemon then just run the command "rsync --daemon" from a suitable startup script. If run from an rsync client via a remote shell (by specifying both the "-e/--rsh" option and server mode with "::" or "rsync://"), the --daemon option is automatically passed to the remote side.

When run via inetd you should add a line like this to /etc/services:


rsync 873/tcp
and a single line something like this to /etc/inetd.conf:


rsync stream tcp nowait root /usr/bin/rsync rsyncd --daemon
Replace "/usr/bin/rsync" with the path to where you have rsync installed on your system. You will then need to send inetd a HUP signal to tell it to reread its config file.

Note that you should not send the rsync server a HUP signal to force it to reread the rsyncd.conf file. The file is re-read on each client connection.

misc 06-02-2005 06:05 AM

Quote:

Originally posted by bramhastra
When run via inetd you should add a line like this to /etc/services:
Please don't mess with /etc/services. It knows about the rsync port number by default. Also note that xinetd is used, not inetd.

bramhastra 06-02-2005 06:16 AM

Well he can give a try and see if it works

misc 06-02-2005 06:21 AM

No. inetd and xinetd use fundamentally different configuration files. rsync via xinetd comes pre-configured on Fedora Core 3 (and older). He just needs to read my post and set up rsyncd.conf according to the manual page.

hverne 06-04-2005 08:37 PM

Thanks guys, It works fine now!


All times are GMT -5. The time now is 11:18 AM.