Networking HowTos
Networking HowTos

Installing HAProxy on CentOS 6

June 25, 2012 CentOS, Linux

This guide will step you through the process of installing HAProxy on CentOS 6.
To install HAProxy on CentOS 6 you first need to set up your installation to use the epel software repository. HAProxy is not available in the default CentOS repositories.
(Note: All commands below require root privileges.)

rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-7.noarch.rpm

You can now install haproxy.

yum -y install haproxy

Now that HAProxy is installed, you can configure the haproxy.cfg file.

vi /etc/haproxy/haproxy.cfg

Once you have configured HAProxy, its time to start the service.

service haproxy start

By default HAProxy wont be set to run at system startup. To enable HAProxy to always start when the PC boots up, run the following:

chkconfig haproxy on

For more information on configuring HAProxy, please check my other howto articles.

You Might Also Like