yum本地库增加软件包_使用DVD作为软件包存储库的Yum

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本地库增加软件包

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值