Chinaunix首页 | 论坛 | 博客
  • 博客访问: 281551
  • 博文数量: 87
  • 博客积分: 4061
  • 博客等级: 上校
  • 技术积分: 1032
  • 用 户 组: 普通用户
  • 注册时间: 2008-09-12 16:28
文章分类

全部博文(87)

文章存档

2012年(1)

2009年(85)

2008年(1)

我的朋友

分类: BSD

2009-01-21 12:06:54

Rsync服务架设

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)
原因是没有开启防火墙端口,请注意!
阅读(1149) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~