1.Modify the configuration file
#vim /etc/sysconfig/network
---------------------------------
HOSTNAME=host6
---------------------------------
then you need to restart your network
#service network restart
In order to connect ip address with the hostname,we need to add a record into /etc/hosts
#vim /etc/hosts
add a record on the first line : 192.168.8.206 host6
Note:don't modify other setting
---------------------------------------------------------------------------------------------------------
192.168.8.206 host6
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
---------------------------------------------------------------------------------------------------------
2.Otherwise,turn off the firewall
#service iptables stop-----------stop firewall
#service iptables status--------check
#chkconfig iptables off ----------disable the firewall to boot when startup
#chkconfig --list | grep iptables--------check