应用环境:

 
可以应在服务器实时同步
 
反网页传该
 
 
-------------------
 
 
rsync 介绍
 
 
make  make install
 
===================
 
 
 
rcync 同步使用方法
 
1.本机文件同步
 
 
2,异地文件同步
 
 
 
    基于rsync
 
    基于samba ,nfs
 
 
3.配置ssh密钥认证
 
    基于ssh的异地同步
 
-----------------------------------
 
 
 
 
rsync --daemon 
 
netstat -tnl |grep 
 
 
cat /etc/rsync.conf 默认为空
 
 
[root@client data]# vi /etc/rsyncd.conf
     uid=root
     gid=root
     use chroot=no
     max connections=20
 
     pid file= /var/run/rsyncd.pid
     lock file= /var/run/rsyncd.lock
     log file= /var/run/rsyncd.log
 
   [web]
 
      path=/var/www/html/bbs/
      lgnore errors
      read only=yes
      hosts allow=169.254.1.0/16
      hosts  deny = 0.0.0.0/32
 
----------------------------------------
 
 创建文件
     dd if=/dev/zero of=/root/data/test.img bs=1M count=2
 
 
rcync -arv /root/data /root/test
 
 
 
 
 more  /etc/xinetd.d/rsync
 
 vi /etc/services 查看服务器端口号