【AnolisOS 8.x】配置本地 repo 源
1、查看系统版本
cat /etc/os-release
- 查询到的
VERSION
值即为版本号
,请根据,版本号下载对应的 ISO 镜像
2、下载对应版本的 ISO 镜像
3、挂载 ISO 镜像
mount AnolisOS-$VERSION-x86_64-dvd.iso /mnt
- 请替换
$VERSION
为具体的版本号
4、编写本地软件源 repo 文件
(1) 备份原有的 repo 文件
cd /etc/yum.repos.d/
mkdir bak
mv *.repo bak/
(2) 编写 local.repo
cat > local.repo <<EOF
[BaseOS]
name=BaseOS
baseurl=file:///mnt/BaseOS
enabled=1
gpgcheck=0
[AppStream]
name=AppStream
baseurl=file:///mnt/AppStream
enabled=1
gpgcheck=0
EOF
(3) 查看其大致如下
[BaseOS]
name=BaseOS
baseurl=file:///mnt/BaseOS
enabled=1
gpgcheck=0
[AppStream]
name=AppStream
baseurl=file:///mnt/AppStream
enabled=1
gpgcheck=0
5、生成元数据缓存
yum clean all && yum makecache
或者执行
dnf clean all && dnf makecache
6、补充:自建内网软件仓库
- 自建内网软件仓库,可以参考《在内网搭建龙蜥镜像站》
《文有终处,缘流长……》