问题表现
- Windows 下访问Linux共享地址第一次打开时特别1-2分钟左右
- 连接成功后打开很快
原因
- Linux主机名和/etc/hosts配置不一样
#hostname
xxx-xxx-xxx
#cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
解决办法
- 修改/etc/hosts. 添加正确的主机名
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 xxx-xxx-xxx
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 xxx-xxx-xxx