首页 > 其他 > 详细

CentOS6安装和配置rsync

时间:2017-08-22 15:43:59      阅读:299      评论:0      收藏:0      [点我收藏+]
实验环境:
操作系统 CentOS6.5 x64
Server  IP地址:192.168.9.104
Client   IP地址:192.168.9.109
1,下载安装rsync
#wget https://download.samba.org/pub/rsync/rsync-3.1.2.tar.gz
#tar xf rsync-3.1.2.tar.gz
#cd rsync-3.1.2
#./configure 
#make 
#make install 
2,Server系统配置rsync
# vim /etc/rsyncd.conf
uid = nobody
gid = nobody
use chroot = no
max connections = 10
pid file = /var/run/rsyncd.pid
log file = /var/log/rsync.log
lock file = /var/lock/rsync.lock
hosts deny = *

[zabbix]
path = /data0/zabbix
comment = zabbix php file
ignore errors
read only = no
write only = no
hosts allow = 192.168.9.109 192.168.1.104 192.168.5.0/24
list = false
uid = root
gid = root
3,Server启动rsync守护进程
# /usr/local/bin/rsync --daemon --config=/etc/rsyncd.conf
# ps -ef | grep rsync
# netstat -lanptu | grep 873
 
4,Client同步操作
从Server同步到Client
# rsync -az --delete --progress --exclude "*.php" --exclude "class.*" 192.168.9.104::zabbix /opt
从Client同步到Server
# rsync -vzrtopg /tmp/5.txt 192.168.9.104::zabbix
可以设置定时任务


CentOS6安装和配置rsync

原文:http://wupengfei.blog.51cto.com/7174803/1958256

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!