分类: LINUX
2014-09-11 10:49:59
Linux永久修改主机名
1 用vi修改/etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=oracleServer
2 用vi修改/etc/hosts
127.0.0.1 localhost.localdomain localhost
#::1 localhost6.localdomain6 localhost6 #没用ipv6可以将此行注释
192.168.245.128 oracleServer
3 修改主机名后要禁用sendmail,否则会加长开机时间
# chkconfig sendmail off
4 重启生效
# reboot