Let's say I've been doing busy with some jobs earlier, So I didn't have a chance to look at it much.
But It is nearly new year, everybody's going back their home after midterm examinations.
For me, It's time to move on and working on stuffs.
The less people, The more I can concentrate on this work. (I don't like to be surrounded by people much.)
Talk to much, let's see how I install crossroads on ubuntu. It's easy and work fine.
First download the crossroads package from their website.
$cd /Untar it.
$wget http://crossroads.e-tunity.com/downloads/crossroads-stable.tar.gz
$tar -xzvf crossroads-stable.tar.gzThen before starting our installation. Make sure that you've already installed the build-essential package.
$sudo apt-get install build-essentialLet's begin!
$cd crossroads-2.68Wait for a moment. Then we done!
$sudo make install
Now it's time for configuration.
Crossroads provides two ways of configuration. Using command-line, or using xml.
Let's see the first one. If we need to use command-line, then we use "xr" command for all configuration.
$xr --verbose --server tcp0:80 / #this will tell xr that we use this server as load balancerThis will make your server to listen to port 80 and to dispatch traffic to servers 10.10.10.2 and 10.10.10.3
-W 10.10.10.1:8001 / #and this will create our web interface on port 8001
-backend 10.10.10.2:80 / #this will create backend according to the ip address and port
-backend 10.10.10.3:80
A web interface for the balancer is started on port 8001
Instead of starting XR by hand, we may use xrcrl as preferable. But first, you've to create a configuration.
To do so, put the following in the file /etc/xrctl.xml
Then type these following commands to start the xr<?xml version="1.0" encoding="UTF-8"?> <configuration> <system> <uselogger>true</uselogger> <logdir>/tmp</logdir> </system> <service> <name>web</name> <server> <address>0:80</address> <type>tcp</type> <webinterface>10.10.10.1:8001</webinterface> <verbose>yes</verbose> </server> <backend> <address>10.10.10.2:80</address> </backend> <backend> <address>10.10.10.3:80</address> </backend> </service> </configuration>
$xrctl startOr to stop.
$xrctl stopThat's all for today. Late night again. OMG!!
Credits : Crossroads