Hi friends,
I have created load-balancing in ubuntu (9.04) for apache server using Crossroad (XR).
You can download Crossroad from http://crossroads.e-tunity.com/downloads.xr. I have configured CrossRoad on 10.6.26.48. You need C compiler (GCC) or C++ Compiler (G++) to compile crossroad, and follow below steps:
1. sudo apt-get install build-essential
2. cd /usr/local/src/
3. sudo tar xvzf ~/Desktop/crossroads-stable.tar.gz
4. cd crossroads-1.59
5. sudo make install
Check that the application was installed where it was supposed to be.
6. cd /usr/local/bin
Create a file called crossroads.conf by using the command below.
7. sudo touch /etc/crossroads.conf
8. sudo vi /etc/crossroads.conf
and copy and paste below code:
service www {
port 80;
revivinginterval 15;
type http;
dispatchmode random;
backend one {
server 10.6.26.12:80;
}
backend two {
server 10.6.26.5:80;
}
}
Here I have creted two backend web-servers (10.6.26.12, 10.6.26.5).We have to install apache webserver on both machine, no need to install apache server on 10.6.26.48. You have to change the ip address according to your use.
Once you have written your configuration file, you can start the server
crossroads start
Surf to the IP address (on eth0 in my case) which the user will be using. Your real servers should now receive connections through the load balancing server and respond to the user through it as well.
Test:
give the ip address of 10.6.26.48 on any browser on the network, and you can see the forwarded request.
Tuesday, March 9, 2010
Thursday, March 4, 2010
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
If you get this Error in Apache2 server, then try this
vim /etc/apache2/apache2.conf
and
append " ServerName localhost:80 "
and restart apache2 server.
OR you can resolve above problem using below tip:
vim /etc/apache2/conf.d/fqdn with following
and append below line:
" ServerName localhost "
vim /etc/apache2/apache2.conf
and
append " ServerName localhost:80 "
and restart apache2 server.
OR you can resolve above problem using below tip:
vim /etc/apache2/conf.d/fqdn with following
and append below line:
" ServerName localhost "
Thursday, February 25, 2010
Change the Name of interface in Ubuntu
sudo vim /etc/udev/rules.d/70-persistent-net.rules
# PCI device 0×14e4:0×1600 (tg3)
SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”, ATTR{address}==”00:xx:xx:xx:xx:xx”, ATTR{type}==”1″, KERNEL==”eth*”, NAME=”eth1″
# PCI device 0×8086:0×4222 (iwl3945)
SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”, ATTR{address}==”00:xx:xx:xx:xx:xx”, ATTR{type}==”1″, KERNEL==”wlan*”, NAME=”wlan0″
Change above to:
# PCI device 0×14e4:0×1600 (tg3)
SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”, ATTR{address}==”00:xx:xx:xx:xx:xx”, ATTR{type}==”1″, KERNEL==”eth*”, NAME=”eth0″
# PCI device 0×8086:0×4222 (iwl3945)
SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”, ATTR{address}==”00:xx:xx:xx:xx:xx”, ATTR{type}==”1″, KERNEL==”wlan*”, NAME=”eth1″
So, all you have to do is to edit /etc/udev/rules.d/70-persistent-net.rules file and change the NAME option to your choice of your ethernet/wifi device name.
# PCI device 0×14e4:0×1600 (tg3)
SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”, ATTR{address}==”00:xx:xx:xx:xx:xx”, ATTR{type}==”1″, KERNEL==”eth*”, NAME=”eth1″
# PCI device 0×8086:0×4222 (iwl3945)
SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”, ATTR{address}==”00:xx:xx:xx:xx:xx”, ATTR{type}==”1″, KERNEL==”wlan*”, NAME=”wlan0″
Change above to:
# PCI device 0×14e4:0×1600 (tg3)
SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”, ATTR{address}==”00:xx:xx:xx:xx:xx”, ATTR{type}==”1″, KERNEL==”eth*”, NAME=”eth0″
# PCI device 0×8086:0×4222 (iwl3945)
SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”, ATTR{address}==”00:xx:xx:xx:xx:xx”, ATTR{type}==”1″, KERNEL==”wlan*”, NAME=”eth1″
So, all you have to do is to edit /etc/udev/rules.d/70-persistent-net.rules file and change the NAME option to your choice of your ethernet/wifi device name.
Tuesday, February 23, 2010
create clone in Virtual Box
If you want to create clone in virtual box follow below steps:
1. Dont copy/paste of existing .vdi file.
2. run Command in terminal
VBoxManage clonevdi old.vdi new.vdi
1. Dont copy/paste of existing .vdi file.
2. run Command in terminal
VBoxManage clonevdi old.vdi new.vdi
Sunday, February 14, 2010
/var/lib/dpkg/status': No space left on device "
If you get error in Ubuntu like "/var/lib/dpkg/status': No space left on device" you can use.
Please open a Terminal from the menu Applications->Accessories->Terminal and type:
sudo apt-get clean all
sudo apt-get update
sudo apt-get -f install
sudo apt-get upgrade
sudo apt-get autoremove
sudo apt-get clean all
give your user password when requested, you don't see nothing when you type it, then press enter.
Then try to remove unused old kernel if you need help please ask here.
Please open a Terminal from the menu Applications->Accessories->Terminal and type:
sudo apt-get clean all
sudo apt-get update
sudo apt-get -f install
sudo apt-get upgrade
sudo apt-get autoremove
sudo apt-get clean all
give your user password when requested, you don't see nothing when you type it, then press enter.
Then try to remove unused old kernel if you need help please ask here.
Saturday, January 16, 2010
Spilit a pdf into many parts
Hi friend,
you can spilit your pdf into as many as part you want, but you have to install "pdftk" package for ubuntu (LINUX), and try below command..
pdftk A=known.pdf cat A1-120 output combined.pdf
where A=known.pdf, is your pdf which you want to spilit into parts, and cat A1-120 is page number, from page 1 to 120 you want to spilit the existing pdf.
for more information you can use below link also:
http://www.accesspdf.com/pdftk/
you can spilit your pdf into as many as part you want, but you have to install "pdftk" package for ubuntu (LINUX), and try below command..
pdftk A=known.pdf cat A1-120 output combined.pdf
where A=known.pdf, is your pdf which you want to spilit into parts, and cat A1-120 is page number, from page 1 to 120 you want to spilit the existing pdf.
for more information you can use below link also:
http://www.accesspdf.com/pdftk/
Saturday, January 2, 2010
Install PHP in ubutnu
To run php program, you have to install following packages:
1. sudo apt-get install php5 libapache2-mod-php5
2. sudo apt-get install php5-cli
3. sudo /etc/init.d/apache2 restart
1. sudo apt-get install php5 libapache2-mod-php5
2. sudo apt-get install php5-cli
3. sudo /etc/init.d/apache2 restart
Subscribe to:
Posts (Atom)