/centos7-haproxy-latest

Compile and Install HAProxy from source on CentOS 7

Primary LanguageShell

HAProxy (From Source) Codacy Badge

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.
  1. Clone the repo
  2. Copy script to home directory
  3. ensure the script has the correct permission to be run
chmod u+x haproxy-install.sh
  1. Run the script
./haproxy-install.sh
  1. Follow the prompts
  2. 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