These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for System Hostname showing as localhost.localdomain on the new forum.
After a fresh installation of Virtualmin on a fresh install of Centos 5.5, Virtualmin is showing the system hostname as localhost.localdomain.
When I run hostname from the command line, it returns the correct hostname.
And having read other forum postings on here, I have added it to etc/hosts (it wasn't there already) and then I clicked Refresh System Information, but no change.
I assume this will cause knock-on problems if I leave it, but how can I make Virtualmin see the correct hostname?
Cheers,
Adam
Howdy,
One place you may want to check is to look in Webmin -> Networking -> Network Configuration -> Hostname and DNS Client.
That'll make sure your hostname is updated in the system's config files.
After doing that, try restarting Virtualmin with:
/etc/init.d/webmin restart
At that point, does it show up correctly?
-Eric
On that page it was showing as localhost.localdomain. I changed it to the correct hostname and it shows up correctly on the Virtualmin page without needing a restart (though I did the restart anyway for the hell of it).
Just so I understand, what would have caused the hostname not to be picked up during the Virtualmin install? Is it because it hadn't yet been added to /etc/hosts?
Cheers,
Adam
Well, what it sounds like is that the hostname on your server was set by running the "hostname" command on the command line, but not actually added to any of the server's config files.
In addition to /etc/hosts, there's other config files on CentOS that have to be updated in order for the hostname to be set when your server reboots. And that's what you did by setting it through Webmin just now.
However, I thought the Virtualmin installer would have complained about that during the installation, so I'm not entirely certain what exactly is going on there :-)
-Eric