yum本地库增加软件包
We introduce the method to use DVD as the package repository for yum. In this post, we use CentOS 5 as the example.
我们介绍了使用DVD作为yum软件包存储库的方法。 在本文中,我们以CentOS 5为例。
1) Modify /etc/yum.repos.d/CentOS-Base.repo
1)修改/etc/yum.repos.d/CentOS-Base.repo
Delete baseurls in [Base] baseurl by add ‘#’ at the beginning of the lines
通过在行的开头添加“#”来删除[Base] baseurl中的baseurl
Then add a line at the end:
然后在最后添加一行:
baseurl=file:///media/CentOS_5.0_Final
‘file://’ means this is a local directory.
“ file://”表示这是本地目录。
Here, ‘/media/CentOS_5.0_Final’ is the mount point of the DVD.
在这里,“ / media / CentOS_5.0_Final”是DVD的安装 点 。
2) Delete /etc/yum.repos.d/CentOS-Media.repo
2)删除/etc/yum.repos.d/CentOS-Media.repo
# mv /etc/yum.repos.d/CentOS-Media.repo ~/
3)Import repository signature
3)导入仓库签名
# rpm --import /media/CentOS_5.0_Final/RPM-GPG-KEY-CentOS-5
4) Then you can install software from the DVM using yum.
4)然后,您可以使用yum从DVM安装软件 。
翻译自: https://www.systutorials.com/yum-using-dvd-as-package-repository/
yum本地库增加软件包