Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2773636
  • 博文数量: 77
  • 博客积分: 10204
  • 博客等级: 上将
  • 技术积分: 5035
  • 用 户 组: 普通用户
  • 注册时间: 2006-03-05 22:13
文章分类
文章存档

2013年(1)

2010年(1)

2009年(17)

2008年(58)

我的朋友

分类: BSD

2009-01-15 11:15:57

1. 安装:yum install rsync

2. Rsync服务器的配置文件(手动创建)
mkdir /etc/rsyncd
touch /etc/rsyncd/rsyncd.conf
touch /etc/rsyncd/rsyncd.secrets
chmod 600 /etc/rsyncd/rsyncd.secrets
touch /etc/rsyncd/rsyncd.motd

3. 启动:/usr/bin/rsync --daemon --config=/etc/rsyncd/rsyncd.conf

4. 同步:rsync -avzP /home

配置文件如下:
#
# Create by 2008/09/14
#
###################################################################

# Main configuration
pid file = /var/run/rsyncd.pid
port = 873
address = IP
uid = nobody
gid = nobody
use chroot = no
read only = no
hosts allow = IP
hosts deny = *
max connections = 5
motd file = /etc/rsyncd/rsyncd.motd
log file = /var/log/rsync.log
transfer logging = yes
log format = %t %a %m %f %b
syslog facility = local3
timeout = 300

[home]
path = /home
list = yes
ignore errors
auth users = admin
secrets file = /etc/rsyncd/rsyncd.secrets
comment = home directory
exclude = './.bash_history.txt'
#exclude = www/ './.bash_history.txt'

其中启动时出现错误:
2009/01/14 22:57:50 [23291] bind() failed: Cannot assign requested address (address-family 2)
原因是没有开启防火墙端口,请注意!
阅读(3127) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~