sersync的安装配置

一 、在目标服务器上安装rsync,xinetd
(1) yum -y install rsync
(2) vi /etc/xinetd.d/rsync
(3) vi /etc/rsyncd.conf
Global Settings
uid = root #以什么身份运行rsync
gid = root
use chroot = no #不使用chroot
max connections = 80 #最大连接数
secrets file = /etc/rsyncd.pwd #密码文件位置,认证文件设置,设置用户名和密码
log file = /var/log/rsyncd.log #指定rsync的日志文件,而不将日志发送给syslog
pid file = /var/run/rsyncd.pid #指定rsync的pid文件
lock file = /var/run/rsync.lock #指定支持max connections参数的锁文件,默认值是/var/run/rsyncd.lock
#comment = hello world
#motd file = /etc/rsyncd.motd #欢迎信息文件名称和存放位置(此文件没有,可以自行添加)

[backup] # 这里是认证的模块名,在client端需要指定
path = /titan24/www/repos # 需要做镜像的目录
auth users = beauty_rsync # 授权帐号。认证的用户名,如果没有这行,则表明是匿名,多个用户用,分隔
read only = no # yes只读 值为NO意思为可读可写模式,数据恢复用NO
hosts allow = 211.78.86.148 #允许访问的服务器IP
hosts deny = * #黑名单
list = true # 允许列文件
ignore errors # 可以忽略一些无关的IO错误
#exclude =  #忽略的目录

 

以xinet的方式去调用,不需要这样用,开启启动,xinet ,rsync --daemon --config=/etc/rsync/rsyncd.conf
/etc/xinetd/rsync里面配置 增加config文件的路径即可,如独立运行,可能会冲突

二、主服务器上安装 sersync ,主服务器上也要安装rsync,且安装xinetd

从google code 里面下载

解压缩,上传到服务器

配置confxml.xml,
运行 ./sersyc2 -r -d

参数 -r 是整体同步的意思

如果重启了主服务器,开机后需要执行 cd /etc/serync

./sersync2 -d


 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值