 |
Linode.com Forum Linode Community Forums
|
| Author |
Message |
stangilbert
Joined: 30 Apr 2008
Posts: 3
|
| Posted: Thu May 01, 2008 8:26 pm Post subject: 3 Questions Driving me CRAZY |
|
|
OK... this has been a long road. I used to run my own server on a mac mini and all was easy and well but decided to go a little more professional. Looked at dedicated servers and discovered Virtual Servers and Linode. Obviously, this is the 'real' world and the structure is a bit different than a mac.
At last, I have a full mail server running multiple accounts and a web server running virtual hosts.
I'm running Ubuntu 7.10
Can someone please tell me the roll of the following three things at the very core level of running a server on a linode...
1. The /etc/hostname in the raw distro is set to 'none'... I am uncertain how this should be set. I edited the file to say...
webserver
2. I placed an entry into the /etc/hosts that looks like this...
67.18.208.11 webserver.acmewebserver.net webserver
... indeed, I own the domain acmewebserver.net. Is this correct? Is this necessary? Why?
3. I placed the following entry into the /etc/network/interfaces file using the IP info from my linode connections page...
iface eth0 inet static
address 67.18.176.247
netmask 255.255.255.0
gateway 67.18.176.1
... again, is this necessary... what does it do... and why?
Why I made these entries is in the days and hours of research online to figure out how to do all the proper setups I encountered similar things here and there with little or no reference to what they should be... if they should be... or why. All very vague with a variety of explanations.
Can anyone clear the muddy water and help?
MUCH MUCH thanks in advance |
|
| Back to top |
|
stangilbert
Joined: 30 Apr 2008
Posts: 3
|
| Posted: Thu May 01, 2008 9:09 pm Post subject: Got 1&2... need 3 |
|
|
Not sure how I missed this but now I fully understand 1 (hostname) and 2 (hosts file).
Still at a loss on 3 (network interfaces)... I get the idea but I'm not sure how to apply this to my linode.
Thanks, Stan |
|
| Back to top |
|
Xan
Joined: 08 Feb 2004
Posts: 285
Location: Austin
|
| Posted: Fri May 02, 2008 12:52 am Post subject: |
|
|
The process you've described for 3 is how you would manually configure a machine for a static IP. Which is basically okay, since you do have a static IP.
But it's probably better to leave it at the default, which is DHCP. Linode's DHCP server will hand you the right address every time. And if you should switch datacenters for any reason, you won't have to modify that file. |
|
| Back to top |
|
SteveG
Joined: 30 Nov 2003
Posts: 196
|
| Posted: Fri May 02, 2008 1:27 pm Post subject: |
|
|
Amplifying: The /etc/network/interfaces file is Debian's (and thus Ubuntu's) way of specifying IP network configuration. This was never standardized in the Unix world, and each OS variant has its own way of doing things; Redhat, for example, has a completely different set of files for controlling the same thing.
When your system boots, a script called 'ifup' reads the interfaces file and performs the necessary 'ipconfig' and 'route' commands for any static ethernet interfaces, starts a DHCP client for dhcp interfaces, etc. Try 'man interfaces' for details. |
|
| Back to top |
|
mnordhoff
Joined: 03 May 2008
Posts: 14
|
| Posted: Sat May 03, 2008 3:22 pm Post subject: Re: 3 Questions Driving me CRAZY |
|
|
stangilbert wrote: 1. The /etc/hostname in the raw distro is set to 'none'... I am uncertain how this should be set. I edited the file to say...
webserver
You might want to give the server a real name ("rivertam" or something) instead of naming it after its purpose, unless it's *only* going to be a web server, forever. Heck, it's not even only a web server now: you said it's a mail server too.
stangilbert wrote: 2. I placed an entry into the /etc/hosts that looks like this...
67.18.208.11 webserver.acmewebserver.net webserver
... indeed, I own the domain acmewebserver.net. Is this correct? Is this necessary? Why?
When I set up an Ubuntu server recently, I set the hostname in /etc/hostname like you did, but instead of editing /etc/hosts, I did this:
In my DNS configuration, I added a subdomain for my Linode, with an A record pointing to its IP (e.g. webserver.acmewebserver.net and 67.18.208.11).
In /etc/resolv.conf, I changed "search linode.com" to "search acmewebserver.com"
In /etc/dhcp3/dhclient.conf, I changed '#supersede domain-name "fugue.com home.vix.com";' to 'supersede domain-name "acmewebserver.com";'
Once the DNS change had propogated, I went to Linode's reverse DNS manager, entered the subdomain I created earlier, webserver.acmewebserver.com, and so set the reverse DNS.
From what I could tell, that's the right way to set a hostname, but I'm not 100% sure. It definitely worked though. |
|
| Back to top |
|
| |
|