Install and Configure HaProxy LBR KodeKloud




At first find the port numbers of all appservers 

cat /etc/httpd/conf/httpd.conf| grep Listen

My port was 3002 for app01, app02 and app03 server

Then Enable, start and check status

systemctl enable httpd && service httpd start && service httpd status

Next login to LBR server and do the followings

yum -y install haproxy
cp /etc/haproxy/haproxy.cfg /etc/haproxy/haproxy.cfg.bkp
cat /etc/haproxy/haproxy.cfg | grep haproxy/stat
vi /etc/haproxy/haproxy.cfg

Save the cfg settings and then verify, enable, start and check status

haproxy -f /etc/haproxy/haproxy.cfg
systemctl enable haproxy && service haproxy start && service haproxy status

Finally validate the result using curl

Share on Google Plus

About Ashadullah Shawon

I am Ashadullah Shawon. I am a Software Engineer. I studied Computer Science and Engineering (CSE) at RUET. I Like To Share Knowledge. Learn More: Click Here
    Blogger Comment
    Facebook Comment


Post a Comment