How to Install lsyncd on CentOS 7
lsyncd is an rsync-based tool that monitors specified directories (including subdirectories) for updates and modifications, then syncs those changes to a specified destination.
- These instructions are intended specifically for installing the lsyncd on CentOS 7.
- I’ll be working from a Liquid Web Core Managed CentOS 7 server, and I’ll be logged in as root.
lsyncd is part of Extra Packages for Enterprise Linux (EPEL), which is a community repository of non-standard packages for the RHEL distribution. First, we’ll install the EPEL repository, for directions see How to enable EPEL repository?
First, you’ll follow a simple best practice: ensuring the list of available packages is up to date before installing anything new.
yum -y update
At this point, installing lsyncd is as simple as running just one command:
yum -y install lsyncd
Example configuration files can be found in the following directory:
cd /usr/share/doc/lsyncd-2.1.5/examples
A basic configuration can be found in lrsync.lua:
/usr/share/doc/lsyncd-2.1.5/examples/lrsync.lua
For a refresher on editing files with vim see: New User Tutorial: Overview of the Vim Text Editor
To view or edit lrsync.lua:
vim /usr/share/doc/lsyncd-2.1.5/examples/lrsync.lua
The lsyncd configuration file is written in the programming language Lua. Learn more about Lua here: http://www.lua.org/docs.html
Related Articles:
About the Author: J. Mays
Our Sales and Support teams are available 24 hours by phone or e-mail to assist.
Latest Articles
How to Edit Your DNS Hosts File
Read ArticleHow to Edit Your DNS Hosts File
Read ArticleMicrosoft Exchange Server Security Update
Read ArticleHow to Monitor Your Server in WHM
Read ArticleHow to Monitor Your Server in WHM
Read Article