您的位置:首页 > 其它

windows2008 R2 角色 服务 功能 iis组件 名称

2014-04-08 14:09 141 查看
1.环境
server:eth0 192.168.4.44
client:eth0 192.168.4.150
[root@master ~]# yum install -y xinetd rsync
[root@master ~]# /etc/init.d/xinetd start
[root@Nodes01 ~]# yum install -y xinetd rsync
[root@Nodes01 ~]# /etc/init.d/xinetd start


2.rsync服务端配置
/etc/rsyncd.conf内容如下
uid=root
gid=root
use chroot=no
max connections=10
strict modes=yes
#同步目录
[rsync]
path=/data03/rsync/
ignore errors
read only=no
list=no
#用户
auth users=user
#密码文件位置
secrets file=/etc/rsync.pass
hosts allow=192.168.4.0/255.255.255.0
pid file=/var/run/rsyncd.pid
lock file=/var/run/rsync.lock
log file=/var/log/rsyncd.log


/etc/rsync.pass内容如下
user:12345678

开启程序
[root@master ~]# rsync --daemon --config=/etc/rsyncd.conf &


3.客户端配置使用

密码文件/etc/rsync.pass内容如下
12345678

验证同步文件
将server上rsync目录内容同步到客户端
[root@Nodes01 ~]# rsync -auzv --progress --delete --password-file=/etc/rsync.pass user@192.168.4.44::rsync /opt/nodes01/rsync/
receiving incremental file list
./
rsync.txt
15 100%   14.65kB/s    0:00:00 (xfer#1, to-check=0/2)
sent 77 bytes  received 173 bytes  500.00 bytes/sec
total size is 15  speedup is 0.06


将client的/opt/test内容同步到server上的rsync
[root@Nodes01 opt]# rsync -auzv --progress --delete --password-file=/etc/rsync.pass /opt/test/ user@192.168.4.44::rsync
sending incremental file list
./
deleting tests.txt
deleting rsync.txt
nginx-1.4.2.tar.gz
767688 100%   12.30MB/s    0:00:00 (xfer#1, to-check=1/3)
rpmforge-release-0.5.2-1.el6.rf.i686.rpm
12376 100%  177.73kB/s    0:00:00 (xfer#2, to-check=0/3)
sent 780514 bytes  received 49 bytes  1561126.00 bytes/sec
total size is 780064  speedup is 1.00


由于以上是明文传输的,现在来看看基于ssh方式
[root@Nodes01 opt]# rsync -av root@192.168.4.44:/data03/rsync /opt/nodes01/rsync/
root@192.168.4.44's password:
receiving incremental file list
rsync/
rsync/ip-tun.sh
rsync/ip_forward~
rsync/ipp.txt
rsync/ipvs.sh
rsync/ipvsadm.sh
sent 110 bytes  received 957 bytes  304.86 bytes/sec
total size is 617  speedup is 0.58


本文出自 “eagle” 博客,请务必保留此出处http://seneagle.blog.51cto.com/1319845/1327990
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: