select * from section<?xml version='1.0' encoding='iso-8859-1' ?>
<article>
<id><![CDATA[34]]>></id>
<author><nick><![CDATA[Juan M. Casillas]]>></nick>
<email><![CDATA[juanm.casillas@jmcresearch.com]]>></email>
></author>
<title><![CDATA[LoadBalancer installation]]>></title>
<subtitle><![CDATA[Administrator?s guide]]>></subtitle>
<body><![CDATA[&lt;p&gt;
Index
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;/projects/loadbalancer/install.html#1&quot;&gt;Introduction&lt;/a&gt;
&lt;li&gt;&lt;a href=&quot;/projects/loadbalancer/install.html#2&quot;&gt;Arch &amp; compiler overview&lt;/a&gt;
&lt;li&gt;&lt;a href=&quot;/projects/loadbalancer/install.html#3&quot;&gt;Requirements&lt;/a&gt;
&lt;li&gt;&lt;a href=&quot;/projects/loadbalancer/install.html#4&quot;&gt;Uncompress distro&lt;/a&gt;
&lt;li&gt;&lt;a href=&quot;/projects/loadbalancer/install.html#5&quot;&gt;Choose install directory&lt;/a&gt;
&lt;li&gt;&lt;a href=&quot;/projects/loadbalancer/install.html#6&quot;&gt;Configuring Makefile&lt;/a&gt;
&lt;li&gt;&lt;a href=&quot;/projects/loadbalancer/install.html#7&quot;&gt;Compiling and installing&lt;/a&gt;
&lt;li&gt;&lt;a href=&quot;/projects/loadbalancer/install.html#8&quot;&gt;Bugs &amp; Support&lt;/a&gt;
&lt;/ol&gt;
&lt;/p&gt;

&lt;h3&gt;&lt;a name=&quot;#1&quot;&gt;Introduction&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;
This document describes the required steps for compiling and 
installing the LoadBalancer software in a linux system.
&lt;/p&gt;


&lt;h3&gt;&lt;a name=&quot;#2&quot;&gt;Arch &amp; compiler overview&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;
LoadBalancer has been developed using a g++ 2.95.2 version. Also, It has 
been tested in a 2.95.3 version, and it works. My libc library version is
2.1.3. The distribution is a Debian potato 2.2. Finally, my arch is a
intel 686 processor, with a 2.2.17 kernel.
&lt;/p&gt;


&lt;h3&gt;&lt;a name=&quot;#3&quot;&gt;Requirements&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;
The developement platform is a linux (intel) box, so if you plan to migrate 
this library to other platform, please send me the patches to include them 
in the main developement tree.
&lt;/p&gt;

&lt;p&gt;
You need at least the 2.95.2 g++ compiler, a gnu makefile and the linux threads
installed. Also, you need the following libraries installed in your system: 

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;/projects/libtool/&quot;&gt;libtool&lt;/a&gt;
&lt;li&gt;&lt;a href=&quot;/projects/libxml/&quot;&gt;libxml&lt;/a&gt;
&lt;li&gt;&lt;a href=&quot;/projects/libnetcomm/&quot;&gt;libnetcomm&lt;/a&gt;
&lt;li&gt;&lt;a href=&quot;/projects/libthreadedserver/&quot;&gt;libthreadedserver&lt;/a&gt;
&lt;/ul&gt;

&lt;/p&gt;

&lt;h3&gt;&lt;a name=&quot;#4&quot;&gt;Uncompress distro&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;
The first thing is uncompress the distribution in a directory. For example,
I will use the /tmp directory:
&lt;/p&gt;

&lt;pre&gt;
        halt% tar xfz lb-0_5.tar.gz 
        halt% cd lb_0_5
        halt% pwd
        /tmp/lb_0_5
        halt%
&lt;/pre&gt;

&lt;p&gt;
Ok, remember this directory, because we need it in the following step.
&lt;/p&gt;


&lt;h3&gt;&lt;a name=&quot;#5&quot;&gt;Choose install directory&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;
We have to plan where to install the program. I usually create a directory 
in my home, called ?devel?; but it is fine to install it under the /usr/local
&lt;/p&gt;

&lt;p&gt;
In this example, I choose as install directory /home/assman/devel. So I
create it first:
&lt;/p&gt;

&lt;pre&gt;
        halt% mkdir /home/assman/devel
&lt;/pre&gt;


&lt;h3&gt;&lt;a name=&quot;#6&quot;&gt;Configuring Makefile&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;
Now we go to the lb directory and edit the Makefile file. In the example,
the lb directory is /tmp/lb_0_5 so:
&lt;/p&gt;

&lt;pre&gt;
        halt% cd /tmp/lb_0_5
        halt% vi Makefile
&lt;/pre&gt;

&lt;p&gt;
First, we find the first variable in the file, BASEDIR and set up to the 
LoadBalancer (lb) directory:
&lt;/p&gt;

&lt;pre&gt;
        export BASEDIR=/tmp/lb_0_5
&lt;/pre&gt;

&lt;p&gt;
Second, we find the second variable, INSTALLDIR, and set up to the installation
directory:
&lt;/p&gt;

&lt;pre&gt;
        INSTALLDIR=/home/assman/devel
&lt;/pre&gt;

&lt;p&gt;
Third, we need to point to the required libraries header files, so find the variable
LIBTOOL_INCLUDE and point it to this place. For ease of use, you
should install all of these libraries under the same directory, (e.g. /usr/local)
if you don?t do that, you need to include by hand all the directories
for the libraries and the include files. In this example, I assume that
all the libraries are installed under /home/assman/devel/include, so I setup this
variable in the Makefile:
&lt;/p&gt;

&lt;pre&gt;
        export LIBTOOL_INCLUDE = /home/assman/devel/include
&lt;/pre&gt;

&lt;h3&gt;&lt;a name=&quot;#7&quot;&gt;Compiling and installing&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;
Now issue a ?make? command to compile all the elements of the program, and to
build it. If no problem is found, you can install it in the choosed
directory. Note that you need to have write permissions in this directory,
so you should become root if you want to install it in a system directory
(e.g. /usr/local). Now, issue a ?make install?. This will copy and create
all the links and required files. 
&lt;/p&gt;


&lt;p&gt;
Before using LoadBalancer you need to setup the variable LD_LIBRARY_PATH
to point to the directory where the required libraries reside. In case
you don?t want to setup this variable by hand, you can add the directory(es)
into the /etc/ld.so.conf file and run a ldconfig; else, you have to setup
this variable, for example:

&lt;pre&gt;
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/assman/devel
&lt;/pre&gt;

&lt;/p&gt;

&lt;p&gt;
After that, you have to configure it editing the configuration file (see
the configuration instructions) and then, you can run LoadBalancer 
issuing the following command:

&lt;pre&gt;
/usr/local/bin/loadb -c /etc/loadb.conf
&lt;/pre&gt;

Assuming you are installed LoadBalancer into /usr/local/bin, and you have
created the configuration file in /etc/loadb.conf.

&lt;/p&gt;

&lt;h3&gt;&lt;a name=&quot;#8&quot;&gt;Bugs &amp; support&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;
This program has been in-deep tested, but some bugs can arised. Also, you
can have some ideas, or improvements for this one. Please send me
an email if you found some bug, if you need support installing this 
program, of if you port it to a different platform. Thanks for
your help. 
&lt;/p&gt;]]>></body>
<keywords><![CDATA[load balancer  install]]>></keywords>
<stamp><![CDATA[1063914469]]>></stamp>
<updated><![CDATA[1070911507]]>></updated>
<language><![CDATA[0]]>></language>
<sections><section><![CDATA[Load Balancer]]></section>
></sections>
<site><![CDATA[http://www.jmcresearch.com]]>></site>
<url><![CDATA[http://www.jmcresearch.com//src/articlehelper.php?action=preview&amp;id=34]]>></url>
</article>