Linux Virtual Server Setup

Fore June

  • Introduction
  • Lab 1 -- Building Linux Kernel
  • Lab 2 -- Installing LVS Admin. Package
  • Lab 3 -- Setting Up Linux Virtual Server
  • Lab 4 -- Setting Up LVS/Tunnel Cluster
  • Lab 5 -- Building a Web Server Cluster
  • Lab 6 -- Installing Heartbeat and Ldirector
  • Lab 7 -- Configuring Heartbeat and Ldirector
  • Lab 6 Install Hearbeat and Ldirector



    Note that you only need to install the applications in the directors. Do not install them in the real machines.

    As I just mentioned you'll need two computers which need not have identical hardware in both machines (or amount of memory, etc.), but if they did, it would make your life much easier when a component fails.

    Now you have to decide on some of your implementation. Your cluster of directors ( do not confuse this with the LVS cluster ) is established via a heartbeat between the two computers (nodes) generated by the software package of the same name. However, this heartbeat needs one or more media paths (serial via a null modem cable, ethernet via a crossover cable, etc.) between the nodes. In the experiment we add a second serial/null modem connection to each node.

    Installing Heartbeat

    1. Study again the concept of high availability and the relevant software packages at the site http://www.linux-ha.org.
    2. Download the following rpm packages from the site http://www.ultramonkey.org/download/heartbeat/1.0.2/redhat_7.3/ heartbeat-1.0.2-1.rh.7.3.i386.rpm
      heartbeat-ldirectord-1.0.2-1.rh.7.3.i386.rpm
      heartbeat-pils-1.0.2-1.rh.7.3.i386.rpm
      heartbeat-stonith-1.0.2-1.rh.7.3.i386.rpm
      and all their dependencies from http://www.ultramonkey.org/download/heartbeat/1.0.2/redhat_7.3/dependancies
    3. Install the above rpm packages and dependencies using the command # rpm -i package_name You should first install the dependency rpms. If still some dependency packages were missing, go to the Red Hat site http://www.redhat.com to download the rpm packages and install them using the rpm command. If you are not able to get a certain dependency package, you can ignore it by applying the command # rpm -i --nodeps package_name If you have installed the packages successfully, you should see the programs heartbeat and ldirector in the directory /etc/init.d. The configuration files are in the directory /etc/ha.d. There are four configuration files that you need to edit or create. Three of them, namely, ha.cf, haresoures and authkeys are in /etc/ha.d. The other one, ldirectord.cf is in /etc/ha.d/conf. Here ldirectord is the Linux Director Daemon which monitors and administers real servers in a cluster of load balanced virtual servers. It is typically started from heartbeat but can also be run from the command line. On startup ldirectord reads the file /etc/ha.d/conf/ldirectord.cf.
    4. Connect the two directors with a serial null modem cable.
    5. Test your serial connection. On one node, which will be the receiver, type: cat < /dev/ttyS0 On the other node, type,: echo hello > /dev/ttyS0 You should see the text on the receiver node. If it works, change their roles and try again.
    << Prev  Next >>