Centos yum安装出现“Could not retrieve mirrorlist“
问题描述:
CentOS 6.x minimal(最小化) 安装, CentOS yum install net-tools 时出现“Could not retrieve mirrorlist ”,
原因:
a.修改网络配置
vi /etc/sysconfig/network-script/ifcfg-eth0
动态获取IP配置(可选1):
ONBOOT=yes MM_Controlled=no BOOTPROTO=dhcp
设置固定IP配置(可选2):
ONBOOT=yes MM_Controlled=no BOOTPROTO=static IPADDR=192.168.1.33 BROADCAST=192.168.1.255 NETMASK=255.255.255.0 GATEWAY=192.168.1.1 DNS1=192.168.1.1 DNS2=192.168.1.2
b.重启网络服务
service network restart