linux yum库地址,Linux 搭建本地yum仓库

To enable custom repositories:

yum-config-manager --enable # 配置私服

cd /etc/yum.repos.d

vi Centos-myyum.repo

[myyum]

name=myyum

baseurl=http://192.168.3.50/myyum

enable=1

gpgcheck=0

# 测试安装,可以用了

[root@localhost yum.repos.d]# yum install -y sshpass

已加载插件:fastestmirror

Loading mirror speeds from cached hostfile

myyum | 2.9 kB 00:00:00

myyum/primary_db | 3.4 kB 00:00:00

正在解决依赖关系

--> 正在检查事务

---> 软件包 sshpass.x86_64.0.1.06-2.el7 将被 安装

--> 解决依赖关系完成

# 测试安装一个50服务器未维护的包telnet,在50上验证过,不存在yum list | grep telnet

# 测试结果安装不了

[root@localhost yum.repos.d]# yum install telnet

已加载插件:fastestmirror

Loading mirror speeds from cached hostfile

没有可用软件包 telnet。

错误:无须任何处理

```

## 更新私服

```

# 50服务器/home/myyum添加telnet离线包

# 重建仓库

createrepo /home/myyum

# 清理缓存

yum clean all && yum makecache

# 50 上验证,可以用

yum install telnet

# 客户端46验证,还是不能用

yum install telnet

# 客户端清理缓存

yum clean all && yum makecache

# 再试

yum install telnet

# 已经可以安装了

```

参考地址:

https://boke.wsfnk.com/archives/389.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值