TurnKey Linux Virtual Appliance Library

How do I set the domain?

nigelcgeorge's picture

I'm new to both turnkey and debian, I'd like to add my VM to my domain. i.e. core.localdomain.co.uk would be it's FQDN

I've set /etc/hostname to core

I've set /etc/hosts to core.localdomain.co.uk core localhost

However the domainname command still returns (none) which is puzzling me.

On Gentoo I just modify /etc/conf.d/net and add dns_domain_lo="localdomain.co.uk" and nis_domain_lo="localdomain.co.uk", restart and voila it works.

I know this is a newbie question, so I do apologize, I just couldn't find a simple answer to this on google.

Jeremy Davis's picture

Only other thing I'd do is DNS entry...

So assuming that you have a local DNS server (that handles DNS queries for localdomain.co.uk) then you just need to add an 'A' record in there that points your server name (core) to it's IP. Then all should be well...

Nigel George's picture

Ahh okay, I don't yet have a

Ahh okay, I don't yet have a DNS server, this is going to be my local DNS Server for my LAN sitting in a VM. First time doing a DNS server, hopefully this guide is a decent one http://mixeduperic.com/ubuntu/seven-easy-steps-to-setting-up-an-interal-dns-server-on-ubuntu.html

Jeremy Davis's picture

Just had a quick scan of it

But it looks all fair and reasonable to me. The only thing which you may run across is that sometime Debian packages have different naems for things, but OTTOMH you shouldn't run across this for installing bind.

BTW there is also a Webmin module for configuring Bind, it's called webmin-bind8 (no that's not a typo, it was built for bind8 but still works fine with bind9). You can install it with apt-get when you install the other packages. I still think that initially it is easier (and more reliable) to set it all up manually initially, but when adding extra names later the Webmin module is good IMO.

Guest's picture


Try typing "hostname" instead. Then "hostname -f"

I think localhost doen't count as a "domainname".  Ric

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)