将 /etc/hosts这个文件中 127.0.0.1 localhost 修改为 127.0.0.1 localhost xxxx.local(没有的话,新增一条即可) xxx就是主机名称 查看主机名称 echo $HOSTNAME