자신의 호스트 이름을 해결하는 데 문제가 있습니다.

자신의 호스트 이름을 해결하는 데 문제가 있습니다.

저는 10.04 LTS 서버를 실행하고 있습니다. 이 문제를 해결할 수 없습니다: "호스트 서버 우분투를 확인할 수 없습니다".

권장되는 모든 솔루션을 시도했지만 아무 것도 작동하지 않았습니다. 이 문제는 호스트 및 호스트 이름 파일의 잘못된 설정으로 인해 발생할 수 있다는 내용을 읽었습니다.

다음은 이러한 파일의 콘테스트입니다.

파일: 호스트 이름

serverubuntu

파일: 호스트

127.0.0.1       localhost
127.0.1.1       serverubuntu

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

참고: 나는 호스트 파일의 두 번째 줄에 대해 여러 가지 다른 항목을 시도했습니다.

127.0.1.1  serverubuntu  serverubuntu.hvc.rr.com
127.0.1.1  serverubuntu  serverubuntu.hvc.rr.com serverubuntu

아무도 일하지 않았습니다.

내 서버에는 고정 IP 주소 192.168.1.199가 할당되어 있습니다.

답변1

/etc/hosts 파일은 다음과 같아야 합니다.

127.0.0.1       localhost
127.0.1.1       serverubuntu//change this to 127.0.0.1
192.168.1.199   serverubuntu//add your static IP


# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

관련 정보