尝试在内网环境安装CentOS7,并搭建离线yum源

下载

CentOS-7-x86_64-Everything-1810.iso

校验SHA256 校验码比对

$ certutil -hashfile CentOS-7-x86_64-Everything-1810.iso SHA256
918975cdf947e858c9a0c77d6b90a9a56d9977f3a4496a56437f46f46200cf71

配置光盘yum源

$ mkdir /media/cdrom
$ mount -t auto /dev/cdrom /media/cdrom
$ cd /etc/yum.repos.d/
$ mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
$ vi /etc/yum.repos.d/CentOS-Media.repo
enabled = 1

$ yum clean all
$ yum makecache
$ yum update

配置光盘自动挂载(需重启)

$ /etc/fstab
/dev/cdrom	/media/cdrom	iso9660	defaults	0	0

安装一些常用软件试试

$ yum install -y vim wget net-tools telnet gcc gcc-c++

你可能感兴趣的:(Centos)