准备环境:
rsync服务器:172.16.3.21
sersync2服务器:172.16.3.23
一、 rsync服务器
先把原来的rsync包删掉yum remove rsync-2.6.8-3.1 -y,
然后到http://rsync.samba.org/下载rsync包我用的包如下图所示

利用securecrt上传本地
[root@acong tongbu1]# cd /home/lincong/tools/
[root@acong tools]# ll
total 52084
drwxr-xr-x 19 root root 4096 Sep 20 2006 linux-2.6.18
-rw-r--r-- 1 root root 52467340 Aug 2 14:15 linux-2.6.18.tar.gz
drwxrwxr-x 10 root root 4096 Aug 2 23:36 rsync-3.0.9
-rw-r--r-- 1 root root 792725 Aug 2 15:34 rsync-3.0.9.tar.gz
[root@acong tools]# tar zxf rsync-3.0.9.tar.gz ##解压
[root@acong tools]# cd rsync-3.0.9 ##进入目录
[root@acong tools]# ./configure --prefix=/usr
[root@acong tools]# make && make install ##编译安装
[root@acong tools]# mkdir -p /opt/tongbu1
[root@acong tools]# vim /etc/rsyncd.conf
uid=root
gid=root
max connections=36000
use chroot=no
log file=/var/log/rsyncd.log
pid file=/var/run/rsyncd.pid
lock file=/var/run/rsyncd.lock
[tongbu1] ##模块
path=/opt/tongbu1 ##推送目录
comment = xoyo video files
ignore errors = yes
read only = no
hosts allow = 172.16.3.0/24
hosts deny = *
[root@acong tools]# rsync --daemon
[root@acong tools]# netstat -npl|grep 873
tcp 0 0 0.0.0.0:873 0.0.0.0:* LISTEN 6509/rsync
tcp 0 0 :::873 :::* LISTEN 6509/rsync
