Centos 6.3下rsync+sersync安装配置笔记
|
四.创建同步目录 # mkdir /data 五.配置认证文件 # echo "user:123456" > /etc/rsync.pas # chmod 600 /etc/rsync.pas # rsync --daemon --config=/etc/rsyncd.conf 六.重启xinetd使其配置生效: # /etc/init.d/xinetd restart 七.设置开机启动: # echo "rsync --daemon --config=/etc/rsyncd.conf" >> /etc/rc.local sersync (推送端) 一.下载sersync源码包 # wget http://sersync.googlecode.com/files/sersync2.5_32bit_binary_stable_final.tar.gz 注:若在64位平台安装则可下载64位sersync源码包,本例用32位 # wget http://sersync.googlecode.com/files/sersync2.5_64bit_binary_stable_final.tar.gz 二.创建sersync目录结构 # mkdir /usr/local/sersync # mkdir /usr/local/sersync/conf # mkdir /usr/local/sersync/bin # mkdir /usr/local/sersync/log # tar zxvf sersync2.5_32bit_binary_stable_final.tar.gz # cd GNU-Linux-x86/ # cp confxml.xml /usr/local/sersync/conf # cp sersync2 /usr/local/sersync/bin 三.配置sersync 1.首先创建连接rsyncd的密码文件 # echo "123456" >/etc/rsync.pas # chmod 600 /etc/rsync.pas 2.配置confxml.xml # cd /usr/local/sersync/conf # vi confxml.xml 按照注释进行修改 ----------------------------- <?xml version="1.0" encoding="ISO-8859-1"?> <head version="2.5"> # 设置本地IP和端口 <host hostip="localhost" port="8008"></host> # 开启DUBUG模式 <debug start="false" /> # 开启xfs文件系统 <fileSystem xfs="false" /> # 同步时忽略推送的文件(正则表达式),默认关闭 <filter start="false"> <exclude expression="(.*).svn"></exclude> <exclude expression="(.*).gz"></exclude> <exclude expression="^info/*"></exclude> <exclude expression="^static/*"></exclude> </filter> <inotify> # 设置要监控的事件 <delete start="true" /> <createFolder start="true" /> <createFile start="true" /> <closeWrite start="true" /> <moveFrom start="true" /> <moveTo start="true" /> <attrib start="true" /> <modify start="true" /> </inotify> <sersync> # 本地同步的目录路径 <localpath watch="/data"> # 远程IP和rsync模块名 <remote ip="192.168.100.29" name="data" /> <!--<remote ip="192.168.8.39" name="tongbu" />--> <!--<remote ip="192.168.8.40" name="tongbu" />--> </localpath> <rsync> (编辑:佛山站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |

