rsync 的安装

进入 /usr/ports/net/rsync

make install clean

两边服务器都安装上

创建密码文件:

/usr/local/etc/rsyncd.secrets 内容:

bind:12345678

// bind 是 本机的DNS 帐号,因为我这个应用主要针对 DNS同步。 密码随便写

然后

vi /usr/local/etc/rsyncd.conf

# rsyncd.conf - Example file, see rsyncd.conf(5) # # Set this if you want to stop rsync daemon with rc.d scripts pid file = /var/run/rsyncd.pid # Edit this file before running rsync daemon!! #uid = nobody #gid = nobody #use chroot = no #max connections = 4 #syslog facility = local5 #[ftp] # path = /var/ftp/pub # comment = whole ftp area (approx 6.1 GB) #[sambaftp] # path = /var/ftp/pub/samba # comment = Samba ftp area (approx 300 MB) #[rsyncftp] # path = /var/ftp/pub/rsync # comment = rsync ftp area (approx 6 MB) #[sambawww] # path = /public_html/samba # comment = Samba WWW pages (approx 240 MB) #[cvs] # path = /data/cvs # comment = CVS repository (requires authentication) # auth users = tridge, susan # secrets file = /usr/local/etc/rsyncd.secrets [dns] comment = dns zone rsync path = /etc/namedb/dnsarea uid = bind gid = bind secrets file = /usr/local/etc/rsyncd.secrets read only = no

rsync 的服务端配置好了。现在开始配置 客户端 推送方

vi /usr/local/etc/rsyncd.secrets

然后输入 和服务端一样的密码: 12345678

然后就OK了。开始推送同步:

/usr/local/bin/rsync -avzP --password-file=/usr/local/etc/rsyncd.secrets /etc/namedb/dnsarea/ 192.168.1.241::dns

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值