2017年10月2日 星期一

CentOS Minimal Installation Network Configuration

By default CentOS minimal install does not come with pre-configured network, here’s how to make it work:

$ ping google.com
ping: unknown host google.com


To fix this we’ll need to edit the set up for the ethernet. Let’s start with editing this file:
$ vim /etc/sysconfig/network-scripts/ifcfg-eth0
IPADDR=x.x.x.x
BOOTPROTO=none
NETMASK=255.255.255.0
GATEWAY=y.y.y.y
DNS1=y.y.y.y
DNS2=y.y.y.y
USERCTL=yes
HWADDR='your mac address'
ONBOOT=yes




$ /etc/init.d/networking restart
or
$ /etc/init.d/network restart


Verify by ping or nslookup

沒有留言:

張貼留言

Docker Command

#1 pull images $docker pull chusiang/takaojs1607 #2 list images $docker images #3.1 run docker $docker run -it ### bash #3.2 run do...