서버 lsyncd.service(999.999.1.203)(서버)
Lync : 실시간 동기화
설치
$ yum install -y lsyncd
설정변경
$ vi /etc/lsyncd.conf
----
-- User configuration file for lsyncd.
--
-- Simple example for default rsync, but executing moves through on the target.
--
-- For more examples, see /usr/share/doc/lsyncd*/examples/
--
-- sync{default.rsyncssh, source="/var/www/html", host="localhost", targetdir="/tmp/htmlcopy/"}
settings {
logfile = "/var/log/lsyncd/lsyncd.log",
statusFile = "/var/log/lsyncd/lsyncd-status.log",
statusInterval = 20
}
sync {
default.rsync,
source="/home",
target="192.168.1.15::sync_test",
delay = 1,
}
실행
$ systemctl --now enable lsyncd.service
$ lsyncd /etc/lsyncd.conf
설치
$ rpm -qa | grep rsync
$ rpm -qa | grep xinetd
$ yum install -y rsync
$ yum install -y xinetd
$ vi /etc/rsyncd.conf
max connections = 5
log file = /var/log/rsync.log
timeout = 300
[baro_sync]
comment = baro sync
path=/home
hosts allow=999.999.94.42,999.999.94.41
uid=root
gid=root
use chroot=yes
read only=no
$ systemctl --now enable rsyncd.service
$ systemctl --now enable xinetd.service