1.安装linux最小化
2.修改分辨率:
centos 7:
vi /etc/sysconfig/grub
"nomodeset vga=0x317"
grub2-mkconfig -o /boot/grub2/grub.cfg
3.修改主机ip地址
/etc/sysconfig/network-script/
Ifcfg-enp0s3:
BOOTPROTO=static
ONBOOT=enp0s3
DEVICE=enp0s3
IPADDR0=172.21.10.71
NETMASK0=255.255.255.0
GATEWAY0=172.21..10.254
DNS1=202.96.128.166
4.安装wget或者curl:
Yum install wget
5.备份官方源
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
6.替换为阿里源
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

http://mirrors.163.com/.help/CentOS7-Base-163.repo
yum clean all
yum makecache
7.或更换为光盘源:
everything包含内容较多
挂载光盘
mkdir /mnt/cdrom
mount /dev/cdrom /mnt/cdrom
编辑repo
vi /etc/yum.repos.d/CentOS-Media.repo
[LocalYum]
name=LocalYum
baseurl=file:///mnt/cdrom/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
使用
yum --disablerepo=* --enablerepo=LocalYum
clean all
makecache
然后可以正常使用