Theme: Using the CLI and the Composite Repository to Install Liquibase Business on Linux Systems

Theme: Using the CLI and the Composite Repository to Install Liquibase Business on Linux Systems

Liquibase Business was formerly known as Datical DB.


Use Case: Automation System

Linux is the most common platform for use by automation systems. Typically hosts that are part of automated processes do not have access to the internet. 

  1. From a host that has access to the internet, download the Liquibase Business composite repository, which contains installation files for the Liquibase Business clients and JDBC drivers.

  2. Move the composite repository to the host where you want Liquibase Business to run. 

  3. Run the installation from the command line. 

  4. Test the installation using the CLI

  5. Create scripts for the automation system that call Liquibase Business commands

See the video: Installing from the CLI on Linux

Installing Liquibase Business on a Linux System

Follow these steps to install Liquibase Business. 

1. Download Installation Files

On a host that has internet access, download the following items from software.datical.com:

  • Linux installer (.jar file) - Example: DaticalDB-linux.gtk.x86_64-5.12.5833

  • Composite repository - Example: DaticalDBCompositeRepo-5.12.5833.zip

Go to software.datical.com to download files. 

2. Verify the JDK Version on the Installation Host

Run the following "java -version" command in a terminal window to check that you are running a supported version of the JDK (version 1.8.x)

# java –version java version "1.8.0_xx" Java(TM) SE Runtime Environment (build 1.8.0_xxx) Java HotSpot(TM) Client VM (build 24.75-b04, mixed mode, sharing)

3. Create the Liquibase User

Liquibase should be installed as a non-root user.  Commonly this user is named "liquibase".

groupadd liquibase useradd -d /opt/liquibase -g liquibase liquibase passwd liquibase

4. Set Up Installation Directories 

Make sure that the “liquibase” user owns the liquibase directory and subdirectories.

mkdir liquibase mkdir liquibase/installers mkdir liquibase/license mkdir liquibase/LBB_x.y.z ln -sf LBB_x.y.z liquibase/LiquibaseDB

5. Prepare the Installation Files 

  1. Copy the Linux installer to the liquibase/installers directory

  2. Copy the Composite Repo to the liquibase/installers directory

  3. Copy your license file to the liquibase/license directory

6. Run the Installer to Install the Liquibase Business Clients

Run the installer as the “liquibase” user. You will be prompted for the required information.

java -jar ./installers/<Liquibase Business Installer>.jar -console

7. Update the PATH Variable

  1. Add Liquibase Business CLI to the path

    vi ~/.bash_profile export LIQUIBASE_HOME=<path_to_liquibase>/LiquibaseDB export PATH=${PATH}:${LIQUIBASE_HOME}/repl

     

  2. Source the updated .bash_profile

    . ~/.bash_profile

     

8. Install the License File

Install Liquibase Business License in the license directory you created. 

cd ~/liquibase/license cp <license_file> ../LiquibaseDB/repl hammer installLicense <license_filename> 

9. Install Database Drivers for the CLI

At the command line, run the following command:

<liquibase_install_dir>/repl/hammer installDrivers jar:file:/<path_to_repo>/DaticalDBCompositeRepo-version.zip\!/

You need to replace the word "version" with your actual Liquibase Business version number in the command above.

Also note the escaped exclamation point in the command:

\!/

10. Verify the Install

Run the following commands to verify the install.

hammer show version hammer show license hammer checkdrivers



See also this video: Installing from the CLI on Linux





Copyright © Liquibase 2012-2022 - Proprietary and Confidential