자꾸 CentOS가 그리워지는 나날..

 

sudo vim /etc/network/interfaces

 

해당 인터페이스 들어가서 편집

 

auto eth0
iface eth0 inet static
address x.x.x.x
gateway x.x.x.x
netmask x.x.x.x

dns-nameservers x.x.x.x

 

ethernet interface 이름을 적고 그 뒤에 static을 적어준다음 ip를 적어주면 종료

 

sudo /etc/init.d/networking restart

 

편집후 daemon restart는 필수!

 

Host 명도 바꾸자

 

sudo vim /etc/hostname

 

수동으로 네트워크 설정하면 DNS도 추가해야지잉~

 

sudo vim /etc/resolv.conf

nameserver x.x.x.x