centosでrsncをインストール、設定する

1.yum install rsync
vi /etc/rsyncd.conf
設定内容:
uid = root
gid = root
use chroot = no
max connections = 30
pid file = /var/run/rsyncd.pid
lock file = /var/run/rsyncd.lock
log file = /var/log/rsyncd.log
transfer logging = yes
log format = %t %a %m %f %b
syslog facility = local3
timeout = 300
hosts allow = 127.0.0.1,192.168.130.109
read only = yes
auth users = root
secrets file = /etc/rsync.pas
[bbsdata]
path = /file

2.vi /etc/rsync.pas
root:startnew24

3.再起動
ps -ef |grep rsync
kill -9 22419 && rm -rf /var/run/rsync*
rsync –daemon

4.クライアント
rsync -aP –delete root@192.168.130.109::dbbak/199news /www/dbbak –password-file=/www/rsync.pas
vi rsync.pas
startnews24

Linux

Posted by arkgame