Bitnami Ubuntu virtaul machine change the ip address

Have a Bitnami VM with Ubuntu OS on an ESXi host.  Before I can "trust" this installation, need to change the IP to static.

The Ubuntu ifconfig will work, but when the server reboots, the result is back to the DHCP assigned IP address.  The Bitnami script for updateip is missing from this installation.  Did install webmin, but configuring the Apache module for the Bitnami location is a little out of my league.  That and everything is working so well, just feel ridiculous not to be able to set the IP without extraordinary measure.

So if I can attempt to phrase the question better; what is a way to set the Apache web server to get it to stay on the static IP am setting on the eth0?
VirtualKansasAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

junipllcCommented:
There is, but the answer depends on whether you are using virtual name based hosts in your apache configuration. Setting a static ip on an Ubuntu server is also relatively straightforward if you know where to look. I'm mobile at the moment so I can't provide specifics without getting into a massive fight with my phone (it doesn't like command line stuff). If you can provide an answer to the question above I'll check on a proper desktop machine as soon as I can.

Cheers,
Mike
0
VirtualKansasAuthor Commented:
Odds are good it's a virtual name based host.  I haven't been able to spend a lot of time on this but it's important as there are several Bitnami type opportunities looming.  I figured I would start with a low risk install to get my arms around the process & the pitfalls.  Thank you..,
0
junipllcCommented:
In order to configure the server for a static IP address, you need to edit a couple of configuration files (all as root). The most important is: /etc/networking/interfaces.

You'll probably see something like the following:
auto lo eth0
iface lo inet loopback
iface eth0 inet dynamic

Open in new window

You would need to change that to (matching your network's configuration):
auto lo eth0
iface lo inet loopback
iface eth0 inet static
        address xxx.xxx.xxx.xxx (this is your static IP)
        netmask xxx.xxx.xxx.xxx (again, this should match your network.)
        gateway xxx.xxx.xxx.xxx (enter gateway/router address)

Open in new window

Then open /etc/resolv.conf and set it up something like this (I'm using Google's public DNS servers here):
nameserver 8.8.8.8
nameserver 8.8.4.4

Open in new window

Then either reboot or run "/etc/init.d/networking restart"

Voilà! You have a static IP.

For Apache, the configuration file for your VirtualHosts should look something like this:
<VirtualHost xxx.xxx.xxx.xxx:80>
-configuration here-
</VirtualHost>

Open in new window

where xxx.xxx.xxx.xxx is your new static IP. This should make Apache respond to that IP for that VirtualHost on port 80.

I hope this answered the question correctly. If not, let me (us) know and we'll answer the correct one. :)

Cheers,

Mike
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

VirtualKansasAuthor Commented:
OK I'll do it, but one thing at the risk of sounding like a total infidel; how do I edit config. files?
0
junipllcCommented:
At the risk of being alienated by some of the rest of the Linux folk around here, I like to use nano from the command line. If you are on the command line, just type "nano <filename>", like this:

nano /etc/networking/interfaces

...and you'll be able to edit the file. To save and exit, you hit control-O, enter, then control-X (these are shown at the bottom of the screen). If, for some reason, Bitnami decided not to include nano, then as root type:

apt-get install nano

and Ubuntu's package manager will do the rest for you.

Many Linux gurus will insist that you use vim, or vi, or even emacs (all text editors), but I think you should definitely start with nano. It's the easiest and it displays all the major commands right at the bottom of the screen.

If you're not on the command line, let me know and we'll get you there. If you're using the Ubuntu GUI (I don't think Bitnami has this?) then it's as easy as using one of the text editors built into that. But that's a different story.

Cheers,

Mike
0
VirtualKansasAuthor Commented:
Thank you, Mike.  Wish I could award more points just for your thoroughness and professionalism.  I'll follow through as time allows, but firmly believe the question is more than answered.  Best regards...
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.