配置本地yum源
获取openEuler-24.03-LTS-SP2镜像文件并将其配置为本地镜像源。
- 挂载openEuler-24.03-LTS-SP2-everything-aarch64-dvd.iso镜像。
mkdir /mnt/ISO mount -o loop /home/openEuler-24.03-LTS-SP2-everything-aarch64-dvd.iso /mnt/ISO
- 配置本地源。
- 备份原有本地源,以本地镜像源名称为openEuler.repo为例。
如操作系统中无本地镜像源文件openEuler.repo,则无需进行此操作。
mv /etc/yum.repos.d/openEuler.repo /etc/yum.repos.d/openEuler.repo.bak
- 增加本地源配置文件openEuler-24.03-local.repo。
cd /etc/yum.repos.d vim openEuler-24.03-local.repo
- 按“i”进入编辑模式,在本地源中添加以下内容:
[everything] name=everything baseurl=file:///mnt/ISO enabled=1 gpgcheck=0 EOF
- 按“Esc”键,输入:wq!,按“Enter”保存并退出编辑。
- 备份原有本地源,以本地镜像源名称为openEuler.repo为例。
- 初始化本地缓存索引。
yum clean all yum makecache
父主题: 常用操作