[root@proxyo ~]#
而我要将中间的proxyo改成search
1. vi /etc/hosts
[root@proxyo ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 search localhost.localdomain localhost
2. vi /etc/sysconfig/network
[root@proxyo ~]# cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=search
GATEWAY=192.168.1.1
3. 运行hostname命令:
# hostname search