Install Liquibase on Linux/Unix
Before you begin
Confirm that Java is installed. If you use the Liquibase Installer, Java is included automatically.
Procedure
Download Liquibase.
1. Find the version of Liquibase you would like to download on our download page.
2. Once you've located the tar.gz file you would like to download from our repo you can extract it using wget or curl.
Be sure to replace your_version with the Liquibase version you want to download. For example, liquibase-secure-5.0.3.
curl -LO https://package.liquibase.com/downloads/cli/your_version.tar.gzRun the installer.
Extract the tar.gz.
Be sure to replace your_version with the Liquibase version you want to download. For example, liquibase-secure-5.0.3.
tar -xzf your_version.tar.gz -C /opt/liquibaseApply your Liquibase Secure license key.
Using a Secrets Management tool like Hashicorp Vault or AWS Secrets Manager is best to keep Liquibase license keys secure.
There are several ways to apply the Liquibase Secure license key:
Include the Liquibase Secure license key in the Liquibase properties file and save it.
For example:
liquibase.licenseKey: aei76ou32thp785463214
Add Liquibase to your system PATH.
To run Liquibase commands from any terminal window, you must add the Liquibase to your system PATH. For detailed instructions, macOS, Linux, and Unix users can use this guide to adding a directory to your PATH.
When following the guide, be sure to add the export line to your shell config file.
~/.zshrc if you're using Zsh (default on macOS 10.15+)
~/.bashrc or ~/.bash_profile if you're using Bash (common on Linux and other Unix systems)
Be sure to replace /usr/local with the path to your Liquibase installation.
Example line to add:
export PATH="$PATH:/usr/local/liquibase"
After saving the file, apply your changes by restarting your terminal or running:
source ~/.zshrc # or ~/.bashrc
Verify Liquibase has been added to your system PATH.
Once added, open a new Command Prompt and run:
liquibase --versionIf it returns the version number, Liquibase is installed and ready to use.