centos 虚拟机中最小化安装,无法上网的解决方法

step1. 进入系统配置目录

cd /etc/sysconfig/network-scripts/
  •  

step2.修改系统配置

vi ifcfg-ens33
  •  
  • 修改ONBOOT=yes
  • 保存退出
:wq

step3.重启服务

service network restart

验证
ping www.baidu.com

其他问题
ifconfig 出现 command not found
原因:选择了 minimal install 的话,没有安装网络组件
解决方法: yum install net-tools

你可能感兴趣的:(配置问题,centos,服务器)