Debug School

Cover image for Install Liquibase
Suyash Sambhare
Suyash Sambhare

Posted on

Install Liquibase

Automate tedious database changes to improve collaboration, release faster, and stay compliant
Liquibase open source software helps development teams rapidly manage database schema changes at scale.

Features of Liquibase

  • Flexible database change
  • Easily define changes in SQL, XML, JSON, or YAML.
  • Version control for your database
  • Order changes and standardize development.
  • Built for developers
  • Control when, where, and how database changes are deployed.
  • Version-controlled database schema changes
  • Automatically orders scripts for deployment
  • Branching and merging for teams
  • Embeds into your product or build tools, like Jenkins
  • Easily rollback changes

Requirements

Liquibase is designed to run with minimal hardware and software.
Liquibase tests with English language databases only. Other languages with special characters may cause issues.

  • Disk space: 300 MB
  • Processor: Intel Core i3 1 CPU
  • Memory: 1 GB RAM
  • Software Any version of Windows, macOS, or Linux/Unix with a supported Java installation. Java 8 is the minimum required version. If you use the Liquibase Installer, Java is included automatically.
  • Database: The Liquibase CLI ships with drivers for many popular database systems in the liquibase/internal/lib directory If you are using a different database system or need to run a different version of the driver, you can download the appropriate driver from your vendor, and install it in one of two places: The lib directory of your Liquibase installation – Drivers added here will always be used by Liquibase. A liquibase_libs directory of your current working directory – Drivers added here will only be used when you are in this working directory. If you are using any Liquibase extensions, they can be added to the same directories.

Manual library management

Liquibase comes with two JAR files in liquibase/internal/lib serving as primary libraries, liquibase-core and liquibase-commercial. You need a commercial license key to access functionality for Liquibase Pro and other commercial add-ons. If you aren't using the liquibase-commercial JAR and want to exclude it from your project, navigate to liquibase/internal/lib in your command line and manually remove the file:

Linux:
rm liquibase-commercial-4.24.0.jar

Windows:
del liquibase-commercial-4.24.0.jar

Install Liquibase on Ubuntu

You can install, upgrade, and uninstall Liquibase on your Linux machine with the Debian/Ubuntu package installer by following the steps on this page.
To install Liquibase using the Debian/Ubuntu installer package, follow the steps below:

  • Open a terminal.
  • Run the following command to import the Liquibase GPG key and add the Liquibase repository to the apt sources list:
wget -O- https://repo.liquibase.com/liquibase.asc | gpg --dearmor > liquibase-keyring.gpg && \
cat liquibase-keyring.gpg | sudo tee /usr/share/keyrings/liquibase-keyring.gpg > /dev/null && \
echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/liquibase-keyring.gpg] https://repo.liquibase.com stable main' | sudo tee /etc/apt/sources.list.d/liquibase.list
Enter fullscreen mode Exit fullscreen mode

Update the package lists:
sudo apt-get update

Install Liquibase:
sudo apt-get install liquibase

Liquibase is now installed on your system.

Liquibase

Install a specific version

To install a specific version of Liquibase using the Debian/Ubuntu installer package, you can use the package manager's version pinning mechanism. Run the following command and replace x.y.z with the desired version number:

sudo apt-get install liquibase=2.2.1
The specified version of Liquibase is now installed on your system.

Upgrade

To upgrade Liquibase to the latest version, follow these steps:

Open a terminal.
Update the package lists:
sudo apt-get update
Upgrade Liquibase:
sudo apt-get upgrade liquibase

Liquibase has now been upgraded to the latest version available in the repository.

Uninstall

To uninstall Liquibase from your system, follow these steps:

Open a terminal.
Remove the Liquibase package:

sudo apt-get remove liquibase
Enter fullscreen mode Exit fullscreen mode

Liquibase is now uninstalled from your system.

Congratulations! 🧑🏽‍🎤🙏🏽🚬🥃
You have successfully installed Liquibase.

Ref: https://docs.liquibase.com/start/install/liquibase-linux-debian-ubuntu.html

Top comments (0)