csync2 Installation and Setup
Csync2 is a cluster synchronization tool. It can be used to keep files on multiple hosts in a cluster in sync. Csync2 can handle complex setups with much more than just 2 hosts, handle file deletions and can detect conflicts. Installation Build and Install csycn2 by running the below script - build-csync2.sh #!/bin/sh # build-csync2.sh # Make directory to store csync2 related mkdir -p /data/build/ mkdir -p /data/sync-db/ mkdir -p /data/logs/csync2 mkdir -p /data/sync-conflicts/ cd /data/build/ # Get the files from our own file repository wget http://downloads.sourceforge.net/librsync/librsync-0.9.7.tar.gz wget http://oss.linbit.com/csync2/csync2-2.0.tar.gz # Install the packages required to compile csync2 yum install xinetd byacc flex gcc-c++ gnutls gnutls-devel openssl-devel openssl-static sqlite-devel -y # Untar the files tar -xzf librsync-0.9.7.tar.gz tar -xzf csync2-2.0.tar.gz # Build csync2 cd /data/build/csync2-2.0 ./configure \ --prefix=/usr \ --with-librsync-source=/data/build/librsync-0.9.7.tar.gz \ --localstatedir=/var \ --sysconfdir=/etc \ --disable-gnutls make && make install # Remove the directories that we no longer need cd .. rm -rf librsync-0.9.7 rm -rf csync2-2.0 # Add the csync2 port number to /etc/services echo "csync2 30865/tcp" >> /etc/services CSYNCLOC=`which csync2` # Create a xinted definition file for csync2 echo -e "# default: on\n# description: csync2 xinetd server\n\nservice csync2\n{\n disable = no\n flags = REUSE\n socket_type = stream\n wait = no\n user = root\n group = root\n server = $CSYNCLOC\n server_args = -i -D /data/sync-db/\n port = 30865\n type = UNLISTED\n log_type = FILE /data/logs/csync2/csync2-xinetd.log\n log_on_failure += USERID\n}\n" > /etc/xinetd.d/csync2 # Restart the service to include the newly created definition service xinetd restart Setup First, generate ONE self-signed SSL certificate that would be used by your cluster. ...