1. 就是把本机的hostname 添加到 hosts 中,例如:
127.0.0.1 localhost
127.0.0.1 loulldeMacBook-Pro.local
255.255.255.255 broadcasthost
::1 localhost
::1 loulldeMacBook-Pro.local
2. 执行 scutil --set HostName "localhost"
大致原因,获取本机地址,走到了DNS解析,DNS递归解析不到本机域名,耗时5s左右
1. 就是把本机的hostname 添加到 hosts 中,例如:
127.0.0.1 localhost
127.0.0.1 loulldeMacBook-Pro.local
255.255.255.255 broadcasthost
::1 localhost
::1 loulldeMacBook-Pro.local
2. 执行 scutil --set HostName "localhost"
大致原因,获取本机地址,走到了DNS解析,DNS递归解析不到本机域名,耗时5s左右