These are steps to install rsync server.
Install xinetd and rsync packages
#yum -y install xinetd rsync
Then make sure xinetd is running on levels 3, 4 and 5
#chkconfig --level 345 xinetd on
Modify rsync xinetd configuration. We shoud change disable = yes to disable = no
#vi /etc/xinetd.d/rsync
Next, create rsync secrets file for password with format of username:password
#vi /etc/rsyncd.secrets
Last create configuration for rsync shares
#vi /etc/rsyncd.conf
Fill this configuration
# rsyncd.conf
secrets file = /etc/rsyncd.secrets
motd file = /etc/rsyncd.motd
read only = yes
list = yes
uid = nobody
gid = nobody
[out]
comment = Interesting stuff from this server
path = /home/rsync/out
[confidential]
comment = FYI
path = /home/rsync/secret-out
auth users = demby,pratama
hosts allow = *.pratama.us
hosts deny = *
list = false
Then save
After that, fix up permission and ownership file, and restart xinetd service
#chown root.root /etc/rsyncd.*
#chmod 600 /etc/rsyncd.*
#service xinetd restart
You can test it locally:
#telnet 127.0.0.1 873
You should check your server. If SELinux is running, you must disable it or you can let it run. But you have to change some variable. Use this command
#setsebool -P rsync_disable_trans 1
#service xinetd restart
Running the client:
On the remote machine:
# rsync -arv your-user-name@host-with-code-to-sync:/home/rsync/out ./
That's how to install rsync server on CentOS