历史,打开尘封的记忆
新博客地址:https://getstarted.readthedocs.io

导航

 

预备工作:

1、安装好Linux操作系统
2、将安装镜像iso文件上传至虚拟机任意目录

正式步骤:

[root@node-1 ~]# mkdir /dev/local_CentOS
[root@node-1 ~]# mount -o loop /home/CentOS-6.10-x86_64-bin-DVD1.iso /dev/local_CentOS/
[root@node-1 ~]# mkdir /mnt/local_yum
[root@node-1 ~]# cp -r /dev/local_CentOS/* /mnt/local_yum
[root@node-1 ~]# cd /etc/yum.repos.d/
[root@node-1 yum.repos.d]# rename .repo .repo.bak *.repo
[root@node-1 yum.repos.d]# cp CentOS-Base.repo.bak CentOS_local.repo
[root@node-1 yum.repos.d]# cp CentOS-Media.repo.bak CentOS-local.repo
[root@node-1 yum.repos.d]# vim CentOS-local.repo 
[root@node-1 yum.repos.d]# yum clean all
[root@node-1 yum.repos.d]# yum repolist
[root@node-1 yum.repos.d]# umount /dev/local_CentOS
[root@node-1 yum.repos.d]# rm /dev/local_CentOS/ -rf
posted on 2020-01-18 22:17  AR0X1V  阅读(211)  评论(0编辑  收藏  举报