1. Configure a server hostname
- For EL7: set HOSTNAME to the new hostname using the following command
-
hostnamectl set-hostname intigua.example.com
-
Make sure the hostname is accessible by local applications:
- Run:
hostname -f
If the correct hostname is returned, it is available to applications and you're done with this. Otherwise:
- Check if nss-myhostname is installed. If not, run:
yum install nss-myhostname
and wait for the installation to complete.
- Open the following file for editing:
/etc/nsswitch.conf
- Find the line beginning with
hosts
, and add the new hostname to the end of the line. For example, change
hosts: files mdns4_minimal dns
- to
hosts: files mdns4_minimal dns intigua.example.com
- Again run
hostname -f
to confirm that the hostname is successfully resolved.
Comments
0 comments
Please sign in to leave a comment.