This operation guide describes how to configure the host name of the DNS.
Conditions
Log in to the server as user root through telnet.
Please note if there are any alarms which alarm object is old hostname, please manully clear those alarms after the hostname changed to the new one.Because those alarms object (hostname) was changed, they can not be automatically cleared
If the file to be modified is read-only, run the wq! command to save the file forcibly after the modification.
Check the host name of the server.
# hostname
Edit the /etc/hosts file to change the existing host name to a new one.
# TERM=vt100; export TERM # vi /etc/hosts
Edit the /etc/nodename file to change the existing host name to a new one.
# vi /etc/nodename
Check whether the maintenance dual plane is configured. Then, determine whether to modify the corresponding file.
If maintenance dual plane is configured, proceed with the next step.
Edit the files /etc/hostname.ce0 and /etc/ hostname.ce2 to change the existing host names to new ones.
# vi /etc/hostname.ce0 # vi /etc/hostname.ce2
If maintenance dual plane is not configured, proceed with the next step.
If the /etc/hostname.ce0 and /etc/hostname.ce2 files record IP addresses, you need not modify the two files.
In the files /etc/hostname.ce0 and /etc/hostname.ce2, no space is allowed at the beginning of each line of content.
Check the correlation between the /etc/inet/ipnodes and /etc/hosts files.
Run the following command to check the correlation between the /etc/inet/ipnodes and / etc/inet/hosts files.
# ls -al /etc/inet/ipnodes
If the command result contains /etc/inet/ipnodes -> ./hosts, it indicates that the two files are correlated, Then, go to5.b.
If the command result does not contain /etc/inet/ipnodes -> ./hosts, it indicates that the two files are not correlated.Then, go to
Run the following command to check the correlation between the /etc/hosts and /etc/inet/ hosts files.
# ls -al /etc/hosts
If the command result contains /etc/hosts -> ./inet/hosts, it indicates that the /etc/hosts and /etc/inet/hosts files are correlated, and thus the /etc/hosts and /etc/ inet/ipnodes files are also correlated Then, go to7.
If the command result does not contain /etc/hosts -> ./inet/hosts, it indicates that the /etc/hosts and /etc/inet/hosts files are not correlated, and thus the / etc/hosts and /etc/inet/ipnodes files are not correlated. Then, go to6.
Edit /etc/inet/ipnodes to change the previous host name to the new host name.
# vi /etc/inet/ipnodes
Rename the host name directory in the /var/crash directory, and then change the previous host name directory to the new host name directory.