1

Am trying to install virtualmin and it doesn't like the hostname as the FQDN. When doing the Ubuntu install I called it BLAHBLAH-VPS. The virtualmin script trips over that and asks me for a FQDN. Since this machine is mostly a sandbox and will not be public to the outside, not sure what my /etc/hosts and /etc/hostname files should have in them.

/etc/hosts as follows:

127.0.0.1   localhost
127.0.1.1   blahblah-VPS

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
192.168.0.2 blahblahblah.is-a-geek.com

/etc/hostname as follows:

BLAHBLAH-VPS

There is some commentary regarding how the FQDN is a critical aspect of the virtualmin install.

Kendor
  • 4,928

1 Answers1

1

I usually configure the hostname of any Debian or Ubuntu machine as

/etc/hosts

127.0.0.1 host.example.com host localhost.localdomain localhost

/etc/hostname

host

and verify that hostname -s returns the short hostname and hostname -f the FQDN of the machine. I don't think it really matters whether the machine is public or not.


In your case I'd remove the both lines starting with 127.0. and add the line below:

127.0.0.1 blahblah-vps.example.com blahblah-vps localhost.localdomain localhost

Your /etc/hostname looks fine, although in both files I'd just use lower case letters, not because it matters but more for pedantic reasons.