Step1) Open the file /etc/sysconfig/network in vi editor and modify HOSTNAME to FQDN (test1.abs.com)[root@jagan1 oracle]# cat /etc/sysconfig/networkNETWORKING=yesHOSTNAME=test1.abs.com[root@jagan1 oracle]#Step2) Change the hostname in /etc/hosts file
Example:192.168.72.128 test1.abs.com test1[root@jagan1 oracle]# cat /etc/hosts127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4::1 localhost localhost.localdomain localhost6 localhost6.localdomain6192.168.72.128 test1.abs.com test1[root@jagan1 oracle]#step3) Run Hostname[root@jagan1 oracle]# hostname test1.abs.comstep4) Restart networking
[root@jagan1 oracle]# /etc/init.d/network restartShutting down loopback interface: [ OK ]Bringing up loopback interface: [ OK ]Bringing up interface eth0: Active connection state: activatingActive connection path: /org/freedesktop/NetworkManager/ActiveConnection/2state: activatedConnection activated [ OK ][root@jagan1 oracle]#
Restart VM
Step5) Re-Login and verify[root@test1 ~]# hostname -ftest1.abs.com[root@test1 ~]#[root@test1 ~]# dnsdomainnameabs.com[root@test1 ~]#Hostname changed and domain name is matching as per /etc/resolv.conf