Index
- Introduction
- Arch & compiler overview
- Requirements
- Uncompress distro
- Choose install directory
- Configuring Makefile
- Compiling and installing
- Bugs & Support
This document describes the required steps for compiling and
installing the LoadBalancer software in a linux system.
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.
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.
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:
The first thing is uncompress the distribution in a directory. For example,
I will use the /tmp directory:
halt% tar xfz lb-0_5.tar.gz
halt% cd lb_0_5
halt% pwd
/tmp/lb_0_5
halt%
Ok, remember this directory, because we need it in the following step.
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
In this example, I choose as install directory /home/assman/devel. So I
create it first:
halt% mkdir /home/assman/devel
Now we go to the lb directory and edit the Makefile file. In the example,
the lb directory is /tmp/lb_0_5 so:
halt% cd /tmp/lb_0_5
halt% vi Makefile
First, we find the first variable in the file, BASEDIR and set up to the
LoadBalancer (lb) directory:
export BASEDIR=/tmp/lb_0_5
Second, we find the second variable, INSTALLDIR, and set up to the installation
directory:
INSTALLDIR=/home/assman/devel
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:
export LIBTOOL_INCLUDE = /home/assman/devel/include
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.
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:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/assman/devel
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:
/usr/local/bin/loadb -c /etc/loadb.conf
Assuming you are installed LoadBalancer into /usr/local/bin, and you have
created the configuration file in /etc/loadb.conf.
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.