rsync configuration:
#解压:
Tar zxvf rsync-3.1.1.tar.gz
CD rsync-3.1.1
#编译安装
./configure--prefix=/usr/local/rsync
Make
Make install
################ #服务端:
Vi/etc/xinetd.d/rsync
Change it to: Disable = no
#随系统启动RSYNC
Chkconfig rsync on
#配置/etc/rsyncd.conf (manual generation required, without comment)
UID = root
GID = root
Use chroot = no
Max connections = 4
Strict modes = no
Port = 873
PID file =/var/run/rsyncd.pid
Lock file =/var/run/rsync.lock
Log file =/var/log/rsyncd.log
[Test]
Path =/data/test
Hosts allow = 121.40.53.233
Auth users = Test
Secrets file =/etc/rsync.pas
# Configure/etc/rsync.pas user password
Test:123qwe
#赋权限
Chown Root.root/etc/rsync.pas
chmod 600/etc/rsync.pas
# Start
/usr/local/rsync/bin/rsync--daemon
# Check Rsync
netstat-a | grep rsync
################# Client:
# Configure/etc/rsync.pas user password
123qwe
#赋权限
Chown Root.root/etc/rsync.pas
chmod 600/etc/rsync.pas
#同步文件
/USR/LOCAL/RSYNC/BIN/RSYNC-VZRTOPG--progress--exclude=.svn--delete [email protected]::test/home/backup-- Password-file=/etc/rsync.pas
/USR/LOCAL/RSYNC/BIN/RSYNC-VZRTOPG--progress--exclude=.svn--delete [email Protected]::test/tmp/blockip-- Password-file=/etc/rsync.pas
This article is from the "apache323" blog, make sure to keep this source http://apache323.blog.51cto.com/6134209/1692449
Rsync file synchronization server and client configuration