I've recently been "forced" to perform some sysadmin work, while this isn't something that I absolutely love doing I've been reading, experimenting and learning a lot.
There is one fundamental aspect of server configuration that I've not been able to grasp - hostnames.
In Ubuntu for instance, one should set the hostname like this (according to the Linode Library):
echo "plato" > /etc/hostname hostname -F /etc/hostname
127.0.0.1 localhost.localdomain localhost 220.127.116.11 plato.example.com plato
I assume that
plato is an arbitrary name and that
plato.example.com is the FQDN.
Now my questions are:
- Is it mandatory?
- To what purpose?
- Where is it needed / used?
- Why can't I define "localhost" as the hostname for every machine?
- Do I have to set up a DNS entry for the
plato.example.combe used as the reverse DNS entry for my IP?
Also, are there any "best practices" for picking hostnames? I've seen people using Greek letters, planet names and even mythological figures... What happens when we run out of letters / planets?
I'm sorry if this is a dumb question but I've never been too enthusiastic with network configurations.