安装Oracle 11gR2,报错:[INS-06101] IP address of localhost could not be determined
出现这种错误是因为主机名和/etc/hosts 文件不一致,只需要把主机名和其IP 写入/etc/hosts 文件,就ok了。
[root@localhost~]# cat /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=localhost.localdomain
[root@localhost~]# cat /etc/hosts
# Do not removethe following line, or various programs
# that requirenetwork functionality will fail.
127.0.0.1localhost
这里我们修改一下主机名,Linux 下修改/etc/sysconfig/network 里的hostname 需要重启系统才能生效。
修改network 文件之外,再使用hostname 命令指定一下主机名,就不用重启OS了。
[root@localhost~]# cat /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=dave
[root@localhost ~]# hostname
localhost
[root@localhost ~]# hostname dave
[root@localhost ~]# hostname
dave
[root@localhost ~]# cat /etc/hosts
# Do not remove the following line, orvarious programs
# that require network functionality willfail.
127.0.0.1 localhost
192.168.3.222 dave