ORF反垃圾邮件系统

邮件服务器-邮件系统-邮件技术论坛(BBS)

 找回密码
 会员注册
查看: 4552|回复: 0
打印 上一主题 下一主题

[转帖] rsync 完全配置

[复制链接]
跳转到指定楼层
顶楼
发表于 2005-9-29 14:39:17 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
配置 rsync <br>
<br>
系统环境 <br>
<br>
[root@linuxas3 root]# uname -a <br>
Linux linuxas3.9812.net 2.4.21-4.ELsmp #1 SMP Fri Oct 3 17:52:56 EDT 2003 i686 i686 i386 GNU/Linux <br><br>
<br>
安装rsync <br>
<br>
在AS3 第二张CD上找到rsync-2.5.6-20.i386.rpm <br>
<br>
[root@linuxas3 root]# cd /mnt <br>
[root@linuxas3 mnt]# mount cdrom <br>
[root@linuxas3 mnt]# cd cdrom/RedHat/RPMS <br>
[root@linuxas3 RPMS]# rpm -ivh rsync-2.5.6-20.i386.rpm <br><br>
<br>
配置/etc/rsyncd.conf <br>
<br>
在rh9,as3系统上rsync安装后,并没有创建rsyncd.conf文档,笔者是自己创建的rsyncd.conf文档 <br>
<br>
[root@linuxas3 root]# vi /etc/rsyncd.conf <br>
<br>
uid=nobody <br>
gid=nobody <br>
max connections=4 <br>
use chroot=no <br>
log file=/var/log/rsyncd.log <br>
pid file=/var/run/rsyncd.pid <br>
lock file=/var/run/rsyncd.lock <br>
#auth users=root <br>
secrets file=/etc/rsyncd.pwd <br>
<br>
[postfix] <br>
path=/var/mail <br>
comment = backup mail <br>
ignore errors <br>
read only = yes <br>
list = no <br>
auth users = postfix <br>
<br>
[netkiller] <br>
path=/home/netkiller/web <br>
comment = backup 9812.net <br>
ignore errors <br>
read only = yes <br>
list = no <br>
auth users = netkiller <br>
<br>
[pgsqldb] <br>
path=/var/lib/pgsql <br>
comment = backup postgresql database <br>
ignore errors <br>
read only = yes <br>
list = no <br>
<br><br>
<br>
选择说明 <br>
<br>
uid = nobody <br>
gid = nobody <br>
use chroot = no # 不使用chroot <br>
max connections = 4 # 最大连接数为4 <br>
pid file = /var/run/rsyncd.pid #进程ID文件 <br>
lock file = /var/run/rsync.lock <br>
log file = /var/log/rsyncd.log # 日志记录文件 <br>
secrets file = /etc/rsyncd.pwd # 认证文件名,主要保存用户密码,权限建议设为600,所有者root <br>
<br>
[module] # 这里是认证的模块名,在client端需要指定 <br>
path = /var/mail # 需要做镜像的目录 <br>
comment = backup xxxx # 注释 <br>
ignore errors # 可以忽略一些无关的IO错误 <br>
read only = yes # 只读 <br>
list = no # 不允许列文件 <br>
auth users = postfix # 认证的用户名,如果没有这行,则表明是匿名 <br>
<br>
[other] <br>
path = /path/to... <br>
comment = xxxxx <br><br>
<br>
密码文件 <br>
<br>
在server端生成一个密码文件/etc/rsyncd.pwd <br>
<br>
[root@linuxas3 root]# echo postfix:xxx >>/etc/rsyncd.pwd <br>
[root@linuxas3 root]# echo netkiller:xxx >>/etc/rsyncd.pwd <br>
[root@linuxas3 root]# chmod 600 /etc/rsyncd.pwd <br><br>
<br>
启动rsync daemon <br>
<br>
[root@linuxas3 root]# rsync --daemon <br><br>
<br>
测试 <br>
<br>
[root@linux docbook]# rsync rsync://www.9812.net/netkiller <br>
<br>
[root@linux tmp]# rsync rsync://netkiller@www.9812.net/netkiller <br>
Password: <br>
<br>
[chen@linux temp]$ rsync -vzrtopg --progress --delete postfix@www.9812.net::postfix /tmp <br>
Password: <br><br>
<br>
rsync rsync://认证用户@主机/模块 <br>
<br>
rsync -vzrtopg --progress --delete 认证用户@主机::模块 /mirror目录 <br>
<br>
添加到启动文件 <br>
<br>
echo "rsync --daemon" >> /etc/rc.d/rc.local<br>
<br>
<br>
您需要登录后才可以回帖 登录 | 会员注册

本版积分规则

小黑屋|手机版|Archiver|邮件技术资讯网

GMT+8, 2024-5-21 22:50

Powered by Discuz! X3.2

© 2001-2016 Comsenz Inc.

本论坛为非盈利中立机构,所有言论属发表者个人意见,不代表本论坛立场。内容所涉及版权和法律相关事宜请参考各自所有者的条款。
如认定侵犯了您权利,请联系我们。本论坛原创内容请联系后再行转载并务必保留我站信息。此声明修改不另行通知,保留最终解释权。
*本论坛会员专属QQ群:邮件技术资讯网会员QQ群
*本论坛会员备用QQ群:邮件技术资讯网备用群

快速回复 返回顶部 返回列表