Adjust /etc/hosts
Next we edit /etc/hosts. Make it look like this:
mcedit /etc/hosts
127.0.0.1 localhost.localdomain localhost 192.168.0.100 server1.example.com server1 |
Setting The Hostname
(This step is optional.)
This is not necessary if you have set the correct hostname during the installation. You can check the current hostname with the commands
hostname
hostname -f
Both commands should show server1.example.com.
If the output shows a wrong hostname, you can set the correct one like this:
echo server1.example.com >> /etc/hostname
/bin/hostname -F /etc/hostname