Installation From Source

  1. Install the required dependencies:
    1. RHEL and RHEL-based systems:
      # yum install automake byacc flex git gcc gnutls-devel librsync librsync-devel libsqlite3x-devel libpq-devel make mysql-devel
    2. Oracle Linux:

      # dnf install automake byacc flex git gcc gnutls-devel librsync librsync-devel libsqlite3x-devel libpq-devel make mysql-devel
  2. Clone the Csync2 repository:
    # git clone https://github.com/LINBIT/csync2.git
  3. Compile and install Csync2:
    # cd csync2
    # ./autogen.sh
    # ./configure
    # make
    # make install
  4. Create the systemd service unit configuration file:
    # vi /etc/systemd/system/csync2.service
  5. Paste the following content into the file:
    [Unit]
    Description=csync2 file synchronization tool using librsync and current state databases
    After=network.target
                        
    [Service]
    Type=idle
    ExecStart=/usr/local/sbin/csync2 -ii -l
    Restart=on-failure
    
    [Install]
    WantedBy=pcsd.service
  6. Start the service:
    # systemctl start csync2.service
  7. Configure the service to be started automatically at boot:
    # systemctl enable csync2.service