首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >基于daemon模式的rsync同步服务

基于daemon模式的rsync同步服务

作者头像
BGBiao
发布2018-02-26 11:04:19
6240
发布2018-02-26 11:04:19
举报
文章被收录于专栏:容器云生态容器云生态

1.配置rsync服务器(文件提供者)

#yum install rsync -y 

#vim /etc/xinetd.d/rsync

     disable = no

#/etc/init.d/xinetd restart

 #>touch /etc/rsyncd.conf

 #>touch /etc/rsyncd.secrets

 #>touch /etc/rsyncd.motd

#>vim /etc/rsyncd.conf

pid file = /var/run/rsyncd.pid

port = 873

address = 10.24.209.14

uid = nobody

gid = nobody

use chroot = no

#limit access to private LANs

hosts allow= 10.24.182.238 

hosts deny=* max connections = 5 #欢迎信息

motd file = /etc/rsyncd.motd

log format = %t %a %m %f %b syslog facility = local3

timeout = 300

#模块 [zd] path = /export/insurance/reconciliation/download/10013/ list=yes ignore errors auth users = nobody secrets file = /etc/rsyncd.secrets #comment = This is RHEL 4 data #exclude = easylife/ samba/ [rt] path = /export/insurance/reconciliation/download/10014/

list=yes

ignore errors auth users = nobody

secrets file = /etc/rsyncd.secrets

#>vim /etc/rsyncd.secrets用户名和密码

nobody:123456 

#chmod 400 /etc/rsyncd.secrets  

#/etc/init.d/xinetd restart

2.配置被同步机器端(10.24.182.238)

#>vim /etc/rsync_client.pass

123456

#>chmod 600 /etc/rsync_client.pass 

#>rsync -avz --progress --delete --password-file=/etc/rsync_client.pass nobody@10.24.209.14::zd /export/sftp/zdlife/upload/

-u更新

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档