Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Thu May 01, 2008 9:26 pm 
Offline
Newbie

Joined: Wed Apr 30, 2008 2:15 am
Posts: 3
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


Top
   
 Post subject: Got 1&2... need 3
PostPosted: Thu May 01, 2008 10:09 pm 
Offline
Newbie

Joined: Wed Apr 30, 2008 2:15 am
Posts: 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


Top
   
 Post subject:
PostPosted: Fri May 02, 2008 1:52 am 
Offline
Senior Member
User avatar

Joined: Sun Feb 08, 2004 7:18 pm
Posts: 562
Location: Austin
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.


Top
   
 Post subject:
PostPosted: Fri May 02, 2008 2:27 pm 
Offline
Senior Member

Joined: Sun Nov 30, 2003 2:28 pm
Posts: 245
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.

_________________
The irony is that Bill Gates claims to be making a stable operating system and Linus Torvalds claims to be trying to take over the world.
-- seen on the net


Top
   
PostPosted: Sat May 03, 2008 4:22 pm 
Offline
Senior Member

Joined: Sat May 03, 2008 4:01 pm
Posts: 569
Website: http://www.mattnordhoff.com/
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:

  1. 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).
  2. In /etc/resolv.conf, I changed "search linode.com" to "search acmewebserver.com"
  3. In /etc/dhcp3/dhclient.conf, I changed '#supersede domain-name "fugue.com home.vix.com";' to 'supersede domain-name "acmewebserver.com";'
  4. 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.


Top
   
PostPosted: Sun Dec 14, 2008 12:43 pm 
Offline

Joined: Sun Dec 14, 2008 12:31 pm
Posts: 1
mnordhoff wrote:
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:

  1. 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).
  2. In /etc/resolv.conf, I changed "search linode.com" to "search acmewebserver.com"
  3. In /etc/dhcp3/dhclient.conf, I changed '#supersede domain-name "fugue.com home.vix.com";' to 'supersede domain-name "acmewebserver.com";'
  4. Once the DNS change had propogated, I went to Linode's reverse DNS manager, entered the subdomain I created earlier, webserver., 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.


On Ubuntu 8.10 I followed these instructions with the exception of:
mnordhoff wrote:
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


Top
   
PostPosted: Sun Dec 14, 2008 3:42 pm 
Offline
Senior Member

Joined: Sat May 03, 2008 4:01 pm
Posts: 569
Website: http://www.mattnordhoff.com/
grizzled wrote:
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.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group