- Ubuntu에서 /etc/resolv.conf 파일이 초기화되는 현상이 발생 → Ubuntu 기본 세팅
- /etc/resolv.conf 초기화되지 않도록 하기 위해 조치사항
1. apt install 패키지 설치를 위해 /etc/resolve.conf에 nameserver 8.8.8.8 추가
$ vi /etc/resolv.conf
...생략...
nameserver 8.8.8.8
2. resolvconf 패키지 설치
$ apt install resolvconf -y
3. resolvconf 확인
- /etc/resolvconf 디렉토리 확인
- /run/resolveconf/resolv.conf 파일에 소프트링크
$ ls -al /etc/resolv.conf lrwxrwxrwx 1 root root 29 Apr 1 02:44 /etc/resolv.conf -> ../run/resolvconf/resolv.conf
4. head 파일 수정
- resolve.conf 파일은 위에서부터 읽어들임
- nameserver 8.8.8.8이 /etc/resolv.conf 파일의 최하단에 위치하면 다른 nameserver 설정의 IP을 먼저 DNS 서버로 사용하고, 위 DNS가 비정상일 경우에 8.8.8.8을 통해 질의함
$ vi /etc/resolv.conf ...생략... nameserver 8.8.8.8
5. 서버 재부팅 후 재확인 → 정상적으로 유지 확인
$ vi /etc/resolv.conf
...생략...
nameserver 8.8.8.8
참고 자료 : [Solved][Ubuntu18.04] 서버 재부팅시 resolv.conf 초기화되는 문제 해결 :: Devader (tistory.com)
'OS(운영체제) > 리눅스(Linux)' 카테고리의 다른 글
Ubuntu에서 OpenSSL을 설치 및 업데이트 (0) | 2024.04.01 |
---|---|
D-State → Uninterruptible sleep 프로세스 상태 (0) | 2024.03.30 |
Linux 시간을 한국 표준시(KST)로 변경 (0) | 2024.03.26 |
/etc/fstab 파일 (0) | 2024.03.16 |
파일 시스템(Filesystem) (1) | 2024.03.16 |