Now you should set a Piranha Web UI admin password, so we can configure the load balancers via the web admin page.
Note: This should only be done on the primary node, as this is the only load balancer that will be running the Web UI.
[root@lb01 ~]# piranha-passwd New Password: Verify: Adding password for user piranha [root@lb01 ~]#
Lastly we need to open port 3636 on the primary load balancer so we can use the Web UI
[root@lb01 ~]# iptables -I INPUT -p tcp --dport 3636 -j ACCEPT [root@lb01 ~]# service iptables save iptables: Saving firewall rules to /etc/sysconfig/iptables:[ OK ] [root@lb01 ~]#
Now browse to your primary load balancer via your web browser. My primary is lb01.example.com so I have opened http://lb01.example.com:3636
Log in with the username “piranha” and the password you set above.
Under the control/monitoring tab, you will see that the daemon is currently stopped. This is simply because we have not configured our load balancer yet.
See screen shot
Jump across to the Global Settings tab.
You will notice that the IP address of your primary load balancer is already set and the network type is set to direct.
I will be using Direct routing in this article as this is the recommended practice. If you wish to find out more about the different types of networking, please have a read of the Load Balancing document for Red Hat Enterprise Linux 6. You can also click here
See screen shot
Next is the redundancy tab
This is a really straight forward way to set up failover, as we just need to add our IP address of our secondary load balancer.
Click the enable button and then enter the IP address of your secondary.
Click Accept when done
See screen shot
Now its time to actually configure our VIP and real servers. Click the Virtual Servers tab
You will see there is nothing configured. Start by clicking the Add button. Once you see the new item appear, click the edit button.
You can see I have called my virtual server “apache_web_farm”. You can call this what ever you chose. It is not referenced anywhere else other than in IPVS.
As we are creating a web service, I have stated port 80 and given the VIP address of 10.0.1.60
Click Accept when done.
See screen shot
We have now configured the VIP and virtual server. Now we need to assign real servers to this virtual server.
Click the “Real Server” link.
Just like before there will be no servers configured. Click the add button to add a new real server.
Next click the Edit button.
See screen shot
Once you have clicked Edit, you can enter a name and IP address for your real server.
Click accept when done.
See screen shot
Once you have clicked accept, click the Real Server link again to take you back to the list.
See screen shot
The new server will appear, however now you will need to activate the host. Click the radio button on the left, and then click the (De)Activate button.
Your new server should now appear as up.
Repeat the above few steps to add as many real servers as you wish. When you are finished, ensure that all servers are activated.
See screen shot
Can u pls suggest how to manually switch active to standby and vice versa
Hi,
Do we need to configure virtual IP(that is pointed our doman) on LVS router hosts? apart from web real servers
Hello,
I configured it and it is running fine for http.
Now added one more virtual host for https and enabled 443 on firewall. but somehow it is not working. Any idea? Realserver direct https url is working fine.