Question:
Solution:
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
0 comments:
Post a Comment