手机版
你好,游客 登录 注册
背景:
阅读新闻

Linux下架设rsync服务器

[日期:2013-03-19] 来源:Linux社区  作者:王伟 [字体:大 中 小]
二。 修改 rsyncd.conf 和rsyncd.secrets 和rsyncd.motd
 rsyncd.conf 是rsync服务器主要配置文件,我们来个简单的示例;比如我们要备份服务器上的 /nsn_talko_production/talko/var/www/html/Talko/talko.next/repository/
 
 # Minimal configuration file for rsync daemon
 # See rsync(1) and rsyncd.conf(5) man pages for help
 # This line is required by the /etc/init.d/rsyncd script
 pid file = /var/run/rsyncd.pid
 port = 873
 address = estals60
 #uid = nobody
 #gid = nobody
 uid = root
 gid = root
 use chroot = yes
 read only = yes
 
#limit access to private LANs
 hosts allow=* #192.168.1.0/255.255.255.0 10.0.1.0/255.255.255.0
 #hosts deny=*
 max connections = 5
 motd file = /etc/rsyncd/rsyncd.motd
 
 #This will give you a separate log file
 #log file = /var/log/rsync.log
 #This will log every file transferred - up to 85,000+ per user, per sync
 #transfer logging = yes
 log format = %t %a %m %f %b
 syslog facility = local3
 timeout = 300
 [P_repositor]
 path = /nsn_talko_production/talko/var/www/html/Talko/talko.next/repository/
 list=yes      --list 意思是把rsync 服务器上提供同步数据的目录在服务器上模块是否显示列出来。默认是yes 。如果你不想列出来,就no ;如果是no是比较安全的,至少别人不知道你的服务器上提供了哪些目录。你自己知道就行了
 ignore errors                              --忽略IO错误
 auth users = root                          --用户账号 (这个必须得是系统中已经存在的账号)
 secrets file = /etc/rsyncd/rsyncd.secrets  --存放密码的地方
 comment = P_repositor          --相当于是一种接口名字,等服务跑起来了客户端可以直接用这名字调用相关服务器的文件夹内容信息
 #exclude =  beinan/  samba/    --无视这两个文件夹的内容
 
 rsyncd.secrets的内容如下类似
 root:123456
 yofee:123456
 
 rsyncd.motd 文件
 它是定义rysnc 服务器信息的,也就是用户登录信息。比如让用户知道这个服务器是谁提供的等.
 +++++++++++++++++++++++++++
 + Yofee Packages rsync    +
 +++++++++++++++++++++++++++linux
相关资讯       rsync  Rsync服务器  Linux rsync 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款