很多初学者都会遇到最小化安装Cent OS7后如何上网的问题,今天我给大家介绍一下:
在虚拟机下,最小化安装CentOS7后,登录到系统中,
查看网卡信息:
[[email protected] ~]# cd /etc/sysconfig/network-scripts/
[[email protected] network-scripts]# ls
找到ifcfg-eno16777736 进行编辑
[[email protected] network-scripts]# vi ifcfg-eno16777736
TYPE=Ethernet
BOOTPROTO=dhcp
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME=eno16777736
UUID=5c65fd63-2301-45d3-9c3a-0d0f0d7cf7ec
DEVICE=eno16777736
ONBOOT=yes
将ONBOOT=no,更改为yes,保存退出(如何保存?按“insert”两次,按ESC,输入“:wq”)
重启网卡
[[email protected] ~]# service network restart
Restarting network (via systemctl): [ OK ]
网卡已开启,下载工具
[[email protected] ~]#yum provides ifconfig
[[email protected] ~]# yum install net-tools
就可以正常上网了,简单么?有问题,请留言给我。
~