Contents

System/OS
2014.04.05 22:34

[linux] resolv.con 초기화 되는 문제

Views 4704 Comment 0
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print
network를 재시작하면, resolv.conf가 자동 초기화 되는 현상을 겪었다.
그러던중 아래와 같은 원인과 해결책을 찾았다.

리눅스에서 DNS 설정을 바꾸려고 아래 파일을 수정한다.
/etc/resolv.conf
그리고 아래와 같이 서비스를 재시작 하거나 리부팅한다.
/sbin/service network restart
 
하지만  vmware 상에서는 /etc/resolv.conf 수동설정이 안된다.
DHCP 로 ip 를 자동으로 할당 받을때 /sbin/dhclient-script 에 의해서 resolv.conf 파일이 새로 생성되기 때문이다.
(vi /var/log/boot.log 를 보면 dhclient-script 가 /etc/resolv.conf 를 수정하는 것을 알수 있다.)
 
이 문제를 해결하기 위해서 /sbin/dhclient-script 가 /etc/resolv.conf 를 수정하지 못하도록 파일 속성을 불변으로 바꾼다.
chattr +i /etc/resolv.conf


[참고] 아래와 같은 경고가 나온다면 참고..
Bringing up interface eth0: Determining if ip address 121.78.127.197 is already in use for device eth0...
[해결방법] https://www.hooni.net/xe/39012

?

List of Articles
No. Category Subject Author Date Views
202 System/OS [linux] 아파치설치/설정 - 알리어싱(aliasing) hooni 2003.04.23 51458
201 System/OS [windows] 98/ME 속도 빠르게 튜닝(부팅,메모리,레지스터) hooni 2003.04.23 50535
200 System/OS [linux] 우분투 APM + phpmyadmin 설치 hooni 2013.10.07 49422
199 System/OS [linux] CentOS 6.x Cati 설치 (yum) hooni 2014.01.17 48667
198 System/OS HTTP 프로토콜 (브라우저와 웹서버 간의 통신) hooni 2003.04.23 48359
197 System/OS [linux] Masquerade 가상 ip분할기법 hooni 2003.04.23 48023
196 System/OS [linux] 네트웍 트래픽 모니터링(MRTG) hooni 2003.04.23 42501
195 System/OS [ms-sql] 서브스트링(substring), 프로시저(SP) 작성 예제 hooni 2013.04.23 41400
194 System/OS [dos] 노트북 백업 스크립트 xcopy 명령 예제 hooni 2003.04.23 40876
193 System/OS [mac] 맥에서 APM(apache,php,mysql) 구성하기 hooni 2013.04.23 38836
192 System/OS [linux] 처음 설치부터 APM 설치까지 (업데이트 할 것) hooni 2013.04.23 38352
191 System/OS CentOS 6.5 USB 설치 6 file hooni 2013.12.18 37810
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 ... 17 Next
/ 17