欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

telnet getaddrinfo: localhost Name or service not known 有大用

telnet localhost name or service not know 问题解决


telnet 报错 getaddrinfo: localhost Name or service not known

系统:Redhat Linux 5.5
登录方式:ssh 登录
刚才发现在系统上不去,提示getaddrinfo: localhost Name or service not known。 因为/etc/sysconfig/network 和 /etc/hosts文件中的主机名不对应造成的~
[root@uttflying ~]# vim /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 Master    localhost

::1     localhost6.localdomain6 localhost6


只要更改hosts文件中,127.0.0.1这行,在后面的localhost.localdomain localhost 添加 network中一样的hostname
[root@uttflying ~]# vim /etc/sysconfig/network

NETWORKING=yes
NETWORKING_IPV6=yes
HOSTNAME=Master



来自  https://blog.csdn.net/sahenzhang/article/details/8181685

来自  https://www.itread01.com/p/1383205.html


普通分类: