Downloads/builds and installs HAProxy from Source on CentOS 7.
Tested on CentOS 7.4 (Digital Ocean)
This is a simple BASH script that prompts the user for a prefered HAProxy version (List available on HAProxy website), downloads/builds and installs from source.
Please feel free to enhance this script and send any pull requests.
How to use
- Run this script as root.
- Clone the repo
- Copy script to home directory
- ensure the script has the correct permission to be run
chmod u+x haproxy-install.sh
- Run the script
./haproxy-install.sh
- Follow the prompts
- Enjoy!
Install location
Upon completion of this script, an example configurtation file will be copied to /etc/haproxy/haproxy.cfg. Prior to running HAProxy, you will need to add the relevant details for your environment.
The HAProxy binary is installed in the /usr/sbin folder