The software described in this documentation is either in Extended Support or Sustaining Support. See https://www.oracle.com/us/support/library/enterprise-linux-support-policies-069172.pdf for more information.
Oracle recommends that you upgrade the software described by this documentation as soon as possible.
To install HAProxy:
Install the
haproxypackage on each front-end server:#
yum install haproxyEdit
/etc/haproxy/haproxy.cfgto configure HAProxy on each server. See Section 17.2.1, “About the HAProxy Configuration File”.Enable IP forwarding and binding to non-local IP addresses:
#
echo "net.ipv4.ip_forward = 1" >> /etc/sysctl.conf#echo "net.ipv4.ip_nonlocal_bind = 1" >> /etc/sysctl.conf#sysctl -pnet.ipv4.ip_forward = 1 net.ipv4.ip_nonlocal_bind = 1Enable access to the services or ports that you want HAProxy to handle.
For example, to enable access to HTTP and make this rule persist across reboots, enter the following commands:
#
iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT#service iptables saveEnable and start the
haproxyservice on each server:#
chkconfig haproxy on#service haproxy startIf you change the HAProxy configuration, reload the
haproxyservice:#
service haproxy reload

