在虚拟机中以最小化方式安装centos7,后没法上网,由于centos7默认网卡未激活。centos
能够设置 网络
文件 /etc/sysconfig/network-scripts/ifcfg-enp0s3centos7
将 ONBOOT=no 改成 ONBOOT=yesrest
保存后重启网卡: service network restartblog
此时就能够上网了。ip
由于是最小化安装,此时ifconfig命令不能用,可用虚拟机
命令:ip addr 查看分配网卡状况。virtualbox
联网后可运行命令:network
yum install net-toolsservice
来安装ifconfig功能
此时virtualbox采用的网络链接方式为:网络地址转化(NAT)方式