3 Questions Driving me CRAZY
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
6 Replies
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
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.
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.
@stangilbert:
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:
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:
3. 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
, entered the subdomain I created earlier, webserver.acmewebserver.com, and so set the reverse DNS.Linode's reverse DNS manager
From what I could tell, that's the right way to set a hostname, but I'm not 100% sure. It definitely worked though.
@mnordhoff:
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:
3. 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
, entered the subdomain I created earlier, webserver., and so set the reverse DNS. Linode's reverse DNS manager
From what I could tell, that's the right way to set a hostname, but I'm not 100% sure. It definitely worked though.
On Ubuntu 8.10 I followed these instructions with the exception of:
@mnordhoff:
In /etc/resolv.conf, I changed "search linode.com" to "search acmewebserver.com"
Apparently due the 'superceed', after a reboot the "search linode.com" was replaced by "search acmewebserver.com" in /etc/resolv.conf
@grizzled:
Apparently due the 'superceed', after a reboot the "search linode.com" was replaced by "search acmewebserver.com" in /etc/resolv.conf
Right. dhclient replaces /etc/resolv.conf frequently. I changed /etc/resolv.conf too so I wouldn't have to wait for that for the change to take effect.