主机:192.168.111.136 (主服务器)
备机:192.168.111.137 (备服务器)
备/从服务器上操作:
yum -y install rsync
配置rsync
vim /etc/rsyncd.conf
uid=root
gid=root
max connections=36000
use chroot=no
log file=/var/log/rsyncd.log
ignore errors = yes
read only = no
auth users = rsync
secrets file = /etc/rsync.pass
[rsync]
comment = rsync
path=/root/data/
[img]
comment = img
path=/root/data/
echo "rsync:rsync" > /etc/rsync.pass
chmod 600 /etc/rsyncd.conf
chmod 600 /etc/rsync.pass
启动rsync服务
rsync --daemon
主服务器操作:
yum -y install rsync
yum -y install epel-release
yum -y install inotify-tools
tar zxvf sersync2.5.4_64bit_binary_stable_final.tar.gz
mkdir /usr/local/sersync
mv GNU-Linux-x86/ /u