rsync Centos服务端配置
检查rsync 是否已经安装
rpm -qa|grep rsync
安装xinetd
yum install -y xinetd
chkconfig rsync on && service xinetd restart
配置文件 rsyncd.conf
vim /etc/rsyncd.conf
use chroot = false
strict modes = false
port = 8733
hosts allow=*
hosts deny=*
max connections = 5
log file = rsyncd.log
uid = 0
gid = 0
charset=UTF-8
[conf]
path = /usr/local/nginx/conf
read only = false
transfer logging = no
启动
rsync --daemon --config=/etc/rsyncd.conf
防火墙
vi /etc/sysconfig/iptables
-A INPUT -m state --state NEW -m tcp -p tcp --dport 8733 -j ACCEPT
service iptables restart
crontab定时
crontab -e
/30 * rsync --port=873 -vzrtopg --progress --iconv=GBK,UTF-8 --delete 128.1.193.2::conf /usr/local/tengine/conf
service crond restart
评论已关闭