开源数据同步工具:Lsyncd部署实录
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了开源数据同步工具:Lsyncd部署实录相关的知识,希望对你有一定的参考价值。
[[email protected] ~]# yum install -y xinetd [[email protected] ~]# yum install rsync [[email protected] ~]# vi /etc/xinetd.d/rsync # default: off # description: The rsync server is a good addition to an ftp server, as it # allows crc checksumming etc. service rsync { disable = no flags = IPv6 socket_type = stream wait = no user = root server = /usr/bin/rsync server_args = --daemon log_on_failure += USERID }
[[email protected] ~]# vi /etc/rsyncd.conf uid = root gid = root use chroot = no max connections = 10 transfer logging = true log format = "%o %h [%a] %m (%u) %f %l" log file = /var/log/rsyncd.log pid file = /var/run/rsyncd.pid lock file = /var/run/rsync.lock secrets file = /etc/rsyncd.pwd [web] path = /usr/local/tomcat7 auth users = tomcat ignore errors = true read only = no
[[email protected] ~]# vi /etc/rsyncd.pwd tomcat:abcd.1234 [[email protected] ~]# chmod 600 /etc/rsyncd.pwd
[[email protected] ~]# service xinetd start Starting xinetd: [ OK ]
[[email protected] ~]# yum -y install lua lua-devel [[email protected] ~]# yum install rsync [[email protected] ~]# yum install -y lsyncd [[email protected] ~]# vi /etc/lsyncd.conf settings { logfile ="/var/log/lsyncd/lsyncd.log", statusFile ="/var/log/lsyncd/lsyncd.status", inotifyMode = "CloseWrite", maxProcesses = 8, -- nodaemon =true, } sync { default.rsync, source = "/usr/local/tomcat7", target = "[email protected]::web", -- excludeFrom = "/etc/rsyncd.d/rsync_exclude.lst", rsync = { binary = "/usr/bin/rsync", archive = true, compress = true, verbose = true, password_file = "/etc/rsyncd.pwd" } }
[[email protected] ~]# vi /etc/rsyncd.pwd abcd.1234 [[email protected] ~]# chmod 600 /etc/rsyncd.pwd
[[email protected] ~]# /etc/init.d/lsyncd start Starting lsyncd: [ OK ] [[email protected] ~]# /etc/init.d/lsyncd status lsyncd (pid 3282) is running...
以上是关于开源数据同步工具:Lsyncd部署实录的主要内容,如果未能解决你的问题,请参考以下文章