LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-28-2008, 01:07 PM   #1
Icantprintinlinux
LQ Newbie
 
Registered: Oct 2007
Posts: 15

Rep: Reputation: 0
IP Virtual IP - Heartbeat Apache


Hey I am trying to use heartbeat in CentOS with apache

and I need to make a virtual IP address

for example

node1.gogordie.ca (this server is the main webserver) and if it goes down i need Heartbeat to kick in and start up apache on node2.gogordie.ca (I have no problem getting that far). Now apparently I need to make a virtual IP address for the main web server.

How do I make virtual IP address

Last edited by Icantprintinlinux; 03-28-2008 at 01:08 PM. Reason: hit enter by accident lol
 
Old 03-28-2008, 01:53 PM   #2
msound
Member
 
Registered: Jun 2003
Location: SoCal
Distribution: CentOS
Posts: 465

Rep: Reputation: 30
This seems like a fairly straightforward tutorial:

http://linuxhelp.blogspot.com/2005/0...resses-on.html

If you google for:
"redhat how to assigned multiple ip addresses to a single nic"

You'll get a lot of useful results.

Cheers!
 
Old 03-28-2008, 03:39 PM   #3
Linville79
Member
 
Registered: Nov 2006
Location: Indiana, U.S.A.
Distribution: Red Hat Enterprise Linux, Fedora, CentOS
Posts: 134

Rep: Reputation: 16
First, make an alias of your interface:

Code:
cd /etc/sysconfig/network-scripts
cp ifcfg-eth0 ifcfg-eth0:10
Next, edit the alias file:

Code:
DEVICE=eth0  <-- change to eth0:10
ONBOOT=yes
TYPE=Ethernet
IPADDR=192.168.0.100 <-- change to new IP address **
NETMASK=255.255.0.0
GATEWAY=192.168.0.254
** if you're using dhcp, you won't have this line, you'll have a line like:
BOOTPROTO=dhcp


Next, start the new interface:

Code:
ifup eth0:10

Next, check to make sure the interface is up and has an IP address:

Code:
ifconfig -a

You're done. You now have two IP addresses for the same network interface card.
 
Old 03-28-2008, 05:32 PM   #4
Icantprintinlinux
LQ Newbie
 
Registered: Oct 2007
Posts: 15

Original Poster
Rep: Reputation: 0
thanks man, that help out a lot
 
Old 05-28-2009, 12:58 PM   #5
thumper_808
LQ Newbie
 
Registered: May 2009
Posts: 6

Rep: Reputation: 0
did you get your answer?

Hi Icantprintinlinux,
I've done the hardcoding of the ip aliases but that just load-balances...right? I thought you were looking for IP failover. so, you only have 1 out of the 2 servers ever answering requests (http in your case). That's what i'm looking for except it's for mysql. i'm clearly no expert but I have been working with Heartbeat for 2 weeks and simply cannot get Heartbeat to spawn the virtual address that's labelled in the haresources file.

Have you had any luck?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache Virtual Hosts jarrell Linux - Server 6 07-16-2007 11:10 AM
vsftpd, web uploads, vsftpd virtual users, apache virtual hosts, home directories jerryasher Linux - Software 7 02-18-2007 06:29 AM
Apache with virtual hosts linuxmandrake Linux - Security 1 09-14-2006 12:53 PM
Apache Virtual Server g452 Linux - Software 1 05-22-2004 04:06 PM
Virtual Hosts with Apache noripcord7 Linux - Games 1 02-22-2004 10:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration