1.[root@lc1 ~]# vim /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=spring1.lc
2.[root@lc1 ~]# vim /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 lc1.spring localhost
::1 localhost6.localdomain6 localhost6
也可以临时指定:
[root@lc1 ~]# hostname spring1.lc