How to install & configure HAProxy, Keepalived and Apache on REHL 7.6

Dear All,
I have Two Web Server Redhat linux 7.6, I want to install and config the HAProxy and Keep-alive for those two nodes (Web1 && Web2).
The 2 Web Linux server (Web1 && Web2) must have a three services as:
1- HAProxy. >> Need Configuration steps?!
2- Keepalive. >> Need Configuration steps?!
3- Apache. >> Need Configuration steps?!

(Web1 IP Address= 10.25.64.101 )
(Web2 IP Address= 10.25.64.102)
VIP (Virtual IP Address) =10.25.64.111

Can any one help?
Thank you…

Hi Ali,

Welcome to our forums.

We have a guide on how to install and configure HAProxy, I’d suggest check it out.
About Keepalived, what would you like to protect with it? Apache, HAProxy, both?
On the Apache httpd side, the webserver answers to requests to the machine and service sent them - in this case HAProxy, so no changes should be needed.

Dear sandmann,
Thank you very much
Today finally I able to install all three services in one Redhat linux server which are HAProxy, Httpd and Keep-alive and the services are up and running even if one of the service down the second node take owner ship automatic.

But i face small issue after like two hours the server have slow performance I don’t know if this need more and upgrade resource or not even if check the all services are active and functional but have low respond. When I reboot the system every thing work fine and high speed.

I will try to upgrade the CPU and RAM resource and test it the behavior.

Again many thanks for reply & support

Dear All,

i would like to inform you that I had complete setup and configure the system and now is up and running.

just the change is i have to edit the file of HTTPD. remove the port default port 80 and add the custom new port like 1936.
add the new http port in the firewall.

Thank you.

1 Like