This error occurs because the hostname and/etc/hosts file are inconsistent, just need to write the hostname and its IP/etc/hosts file, OK.
Note that the name cannot be underlined
Change the network file, and then use the hostname command to specify the hostname without restarting the OS.
1. Change the/etc/sysconfig/network file
[[Email protected]~]# cat/etc/sysconfig/network
Networking=yes
Networking_ipv6=no
Hostname=shark
2. Use the hostname command to change the host name. The change reboot will fail, but we have changed it in the first step.
So it's okay to fail.
[Email protected] ~]# hostname
localhost
[Email protected] ~]# hostname shark
[Email protected] ~]# hostname
Dave
3. Change the Hosts file
[Email protected] ~]# cat/etc/hosts
# don't remove the following line, orvarious programs
# that require network functionality Willfail.
127.0.0.1 localhost
192.168.7.2 Shark
Oracle installation Error [INS-06101] IP address of localhost could not being determined workaround