1、准备 系统ISO镜像 银河麒麟服务器操作系统
操作步骤: - 配置本地光盘源yum仓库
- 环境:虚拟机上连接上本地光盘 设置静态IP
- [root@localhost ~]# mkdir /media/cdrom 创建挂载点
- [root@localhost ~]# mount /dev/sr0 /media/cdrom/ 挂载光盘
- [root@localhost ~]# cd /etc/yum.repos.d/
- [root@localhost yum.repos.d]# ls
- CentOS-Base.repo CentOS-fasttrack.repo CentOS-Vault.repo
- CentOS-CR.repo CentOS-Media.repo
- CentOS-Debuginfo.repo CentOS-Sources.repo
- [root@localhost yum.repos.d]# mkdir 1
- [root@localhost yum.repos.d]# mv *.repo 1
- [root@localhost yum.repos.d]# vim swd.repo 编辑自己的yum源
- [dvd]
- name=swd
- baseurl=file:///media/cdrom
- enable=1
- gpgcheck=0
-
- [root@localhost yum.repos.d]# yum clean all 清除yum缓存
- [root@localhost yum.repos.d]# yum makecache 创建新缓存可以省略,与下一步可以合在一起
- [root@localhost yum.repos.d]# yum repolist 创建新缓存
- [root@localhost yum.repos.d]# vim /etc/fstab 设置开机自动挂载
- # /etc/fstab
- # Created by anaconda on Wed Nov 6 12:18:08 2019
- #
- # Accessible filesystems, by reference, are maintained under '/dev/disk'
- # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
- #
- /dev/mapper/cl-root / xfs defaults 0 0
- UUID=20b48a67-56c7-404e-83af-9b5c444875e8 /boot xfs defaults 0 0
- /dev/mapper/cl-swap swap swap defaults 0 0
- /dev/sr0 /media/cdrom iso9660 defaults 0 0
复制代码
|
|
|
|
|
版权说明:论坛帖子主题均由合作第三方提供并上传,若内容存在侵权,请进行举报