1、修改 /etc/sysconfig/network
vi
/etc/sysconfig/network
NETWORKING=yes
HOSTNAME=carel(carel为计算机名)
2、修改 /etc/hosts
vi /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
192.168.1.120 carel carel (carel为计算机名称)
3、重启电脑
init 6