Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install flyway DB migration tool in CentOS?

Tags:

flyway

I am trying to install flyway on a centOS machine. I have downloaded Flyway command line tar file and extracted it. I tried to execute some flyway commands but dnt work it says "-bash: flyway: command not found" Did I miss anything. Do I have to install? I dnt find any tutorials for Installation.

like image 863
abhishek veerelli Avatar asked Oct 31 '25 05:10

abhishek veerelli


1 Answers

No need to install it, it's simply a shell script with a JRE, the Flyway Java libraries and associated resources.

Sounds like you need to add the location of to the flyway shell script to your PATH variable if you want to run it without being in the directory or specifying the path.

e.g.

If you have extracted flyway-commandline-4.1.2-linux-x64.tar.gz to /opt/flyway/flyway-4.1.2 which looks like:

flyway-4.1.2
├── conf
├── flyway       # <---- The shell script
├── lib
└── ...

somewhere in your setup you want that on your PATH

export PATH=$PATH:/opt/flyway/flyway-4.1.2

Note the command line documentation mentions the first two steps as

  1. download the tool and extract it

  2. cd into the extracted directory.

like image 126
markdsievers Avatar answered Nov 02 '25 15:11

markdsievers



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!