[x] Welcome to LinuxSolved.com Linux help forums, here we are a community of Linux users helping each other. It is helpful to both ie. new linux users as well experienced one. We always have our experts to help you and ofcourse members help each other, so you can ask for help any time by Registering.: Click to Register

Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Linux Forums - Linux Help,Advice & support community:LinuxSolved.com  |  Forum  |  Linux Software  |  Linux Installation Support  |  Topic: How to install LVS(Linux Virtual Server) on Redhat 9 Pro
The LinuxSolved.com GNU/Linux User Communit - Forum
Welcome to LinuxCommunity You have just arrived to a friendly linux community which is helping Linux Users from Years.. You can be its part if you have not already joined it. Registration is FREE and is gateway to unlimited help and support to all your linux related needs. If you are an GNU/Linux supporter then you have come to the right place.
Pages: [1]
  Print  
Author Topic: How to install LVS(Linux Virtual Server) on Redhat 9 Pro  (Read 2589 times)
0 Members and 1 Guest are viewing this topic.
hanz
Linux Noob !
*
Offline Offline

Posts: 4


View Profile
« on: May 18, 2004, 06:13:35 AM »

Can anyone give me the details how to install,configure etc lvs(Linux Virtual Server) on Redhat 9 Professional HuhHuh
Logged
Ricky
LST CareTaker
Specially Skilled
*****
Offline Offline

Gender: Male
Posts: 2205


View Profile
« Reply #1 on: May 18, 2004, 11:33:41 AM »

Well.. I would Like to know y u need to configure virtual server.. Do u any idea for it is used..
BTw.. that is a long procedure..

Hint.. u need IPVsadm
Logged
hanz
Linux Noob !
*
Offline Offline

Posts: 4


View Profile
« Reply #2 on: May 18, 2004, 09:48:05 PM »

actually I want to do a load balancing on my web server...currently I have 300 users that access to my web server .The increse of user access to the web server...make my web server hang....so i have to restart my web server service...
Logged
Ricky
LST CareTaker
Specially Skilled
*****
Offline Offline

Gender: Male
Posts: 2205


View Profile
« Reply #3 on: May 29, 2004, 01:59:31 AM »

Ok..
First little concept..
Here we make a virtual server which sits in front all real servers and so that we can add , remove real servers. And this virtual server also do load balancing for the real servers.

Ok
That is long procedure.. Let me try to summerize it..

1. Make sure your ipchains etc. are off. And Iptables are on.
2. Second you have to enable ip forwarding.. that is  you can add a line in the /etc/rc.d/rc.local
Also we will add few other lines which will do masquerading for external interface ( Here I am assuming that eth1 is connected to internet.
Code:
echo > 1 /proc/sys/net/ipv4/ip_forward
iptables -t nat -P POSTROUTING DROP
iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE

Now we have to configure ipvsadm, utility to do virtual server things. See linuxvirtualserver.org to get this, also it may need to patch your kernel , get more details from there.

So wht is next is to assign private IP to all your real server and set the gateway on them as the internal IP of the virtual server. Also assign public ip to external interface to the virtual server ie. which is connected to the internet.
Next is to assign alogorithm to ports. like wht what algorithm of virtual server will use for which protocol. Here see ipvsadm man page for more details. Lets assume that  we are assigning wrr and wlc algorithm to port 21 and port 80 resp. means ftp and http traffic. so command wil be
Code:
ipvsadm -A -t xxx.xxx.xxx.xxx:21 -s wrr
ipvsadm -A -t xxx.xxx.xxx.xxx:80 -s wlc
Here xxx.xxx.xxx.xxx is your external IP address of your virtual server.
Now lets assume that our real servers have IP 192.168.5.2 which will handle ftp request and 192.168.5.3 which will handle http reqests, we will also distribute the http request to both servers.. and 192.168.5.1 one is the internal address of your virtual server which is set as gateway in both real servers.

Now adding the real servers to vitual server ..
Code:
ipvsadm -a -t xxx.xxx.xxx.xxx:80 -r 192.168.5.3:80 -m
ipvasdm -a -t xxx.xxx.xxx.xxx:80 -r 192.168.5.2:80 -m -w 2
ipvsadm -a -t xxx.xxx.xxx.xxx:21 -r 192.168.5.2:21 -m
Here http will get distributed along both real server and ftp will go to only 192.168.5.2

I don't this it is comprehensive but it can give a good idea that how to do it in linux. So after  every thing is fine on accessing xxx.xxx.xxx.xxx all request will be forwarded to real servers as per the algorithm.
Logged
lnx_wiz
New Member

Offline Offline

Posts: 1


View Profile
« Reply #4 on: May 29, 2004, 02:08:12 AM »

Ok. Check out this link below. I am sure this will help you set VIRTSERVER up.

http://www.tldp.org/HOWTO/Virtual-Services-HOWTO-3.html
Logged
hanz
Linux Noob !
*
Offline Offline

Posts: 4


View Profile
« Reply #5 on: May 31, 2004, 10:15:51 PM »

Thanks guys....I will install the lvs on my machine...I will come again if i got any problem
Logged
Linux Forums - Linux Help,Advice & support community:LinuxSolved.com
   

 Logged
Pages: [1]
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
mail server in redhat linux 9 Linux Servers Support stephen 0 842 Last post August 04, 2004, 04:59:49 AM
by stephen
how to install network printer in redhat EL4 Linux Installation Support praful_thakare 1 838 Last post October 21, 2005, 04:04:08 AM
by gauravbajaj
How to know if I got real server or virtual server Linux Servers Support taraj 0 549 Last post November 23, 2005, 11:32:04 PM
by taraj
Free Linux Virtual Servers at linuxzoo.net Forum Talk gauravbajaj 1 761 Last post June 09, 2007, 01:11:14 AM
by Ricky
unable to install redhat linux 4.0 Linux Installation Support pespes 1 408 Last post April 01, 2008, 05:53:03 PM
by santasi24
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 22, 2008, 02:47:57 PM

Login with username, password and session length
Navigation
Recent Discussions
[Today at 02:29:08 PM]

[November 20, 2008, 11:30:52 PM]

[November 19, 2008, 07:52:41 PM]

[November 19, 2008, 07:52:36 PM]

[November 17, 2008, 10:42:59 AM]

[November 16, 2008, 12:49:47 AM]

[November 16, 2008, 12:48:58 AM]

[November 15, 2008, 08:29:02 AM]

[November 15, 2008, 08:24:41 AM]

[November 14, 2008, 05:11:50 AM]
Members
Total Members: 6229
Latest: razon_nnn
Stats
Total Posts: 8270
Total Topics: 2254
Online Today: 14
Online Ever: 111
(June 28, 2007, 06:47:29 AM)
Users Online
Users: 0
Guests: 9
Total: 9
Privacy Policy| Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks
Theme & TinyPortal v0.9.8 © Bloc