Chinaunix首页 | 论坛 | 博客
  • 博客访问: 516024
  • 博文数量: 184
  • 博客积分: 10010
  • 博客等级: 上将
  • 技术积分: 2490
  • 用 户 组: 普通用户
  • 注册时间: 2008-06-09 11:34
文章分类

全部博文(184)

文章存档

2011年(1)

2010年(2)

2009年(12)

2008年(169)

我的朋友

分类: LINUX

2008-07-29 05:15:29

1安装
下载rsync安装包
#./configure --prefix=/usr/local/rsync# make# make install
2配置
1)#useradd wstatic
2)#more /etc/rsyncd.conf
uid = wstatic
gid = wstatic
use chroot = no
max connections = 50
timeout=600
#syslog facility = local5
pid file = /usr/local/rsync/logs/rsyncd.pid
log file = /usr/local/rsync/logs/rsync.log
lock file=/usr/local/rsync/logs/rsync.lock
[WSHOME]
        path = /
       # path = /usr/local/zeus/htdocs/wstatic.xunlei.com
        comment =  cnc-blog
        read
       # auth users = wstatic
       # secrets file = /etc/rsyncd.secrets
修改comment =为当前应用

3)/etc/rc.d/rc.local 中增加
/usr/bin/rsync  --daemon  --config=/etc/rsyncd.conf
并运行
/usr/bin/rsync  --daemon  --config=/etc/rsyncd.conf

4)修改/增加访问873端口 /etc/sysconfig/iptables
5)/etc/hosts.allow 和/etc/hosts.deny
  

--------------------------------------------
6)测试rsyncd
  在本机
  # rsync localhost::
    WSHOME          pub2-wstatic,pub3-p4p
  在远端机上
  #rsync biz78.sandai.net::
    WSHOME          tel-blog
注意: 防火墙要开873端口,hosts.allow要开rsync:xx.xx.xx.xx,,推向目录权限为配置文件中的用户
用法如下
rsync -avL yourfile
阅读(699) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~