CentOS6安装和配置rsync
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了CentOS6安装和配置rsync相关的知识,希望对你有一定的参考价值。
实验环境: 操作系统 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的主要内容,如果未能解决你的问题,请参考以下文章