(1)修改/etc/hosts。 (2)修改/etc/hostname。 参考: CentOS/RedHat和Ubuntu/Debian彻底修改主机名(hostname)的方法_竹林听雨-CSDN博客_debian修改主机名