Linux环境修改主机名

当时的场景是:more /etc/hosts 查的结果是 127.0.0.1 localhost  但是主机名显示的是bogon.

root用户查看主机名  # more /proc/sys/kernel/hostname

修改主机名为localhost:echo localhost > /proc/sys/kernel/hostname

安装Oracle时老报错:INS-20802 Oracle Net Configuration Assistant failed

原因是:/etc/hosts 没有bogon 的名字

vi /etc/hosts

加入自己本地ip及对应的名字如:192.168.127.130 bogon

加完安装就不会报错了。

猜你喜欢

转载自www.cnblogs.com/yanch/p/9823556.html