当前位置:网站首页>Repository Manager之Nexus配置yum仓库

Repository Manager之Nexus配置yum仓库

2022-06-11 14:18:00 华为云

创建步骤

创建blob存储位置

创建仓库

2. 创建仓库[三种类型:hosted(自建yum)、proxy(代理阿里yum、163yum等)、group(透明代理,将hosted和proxy组合)]

创建代理仓库

创建主机仓库

创建组合yum仓库

生成的url为:http://43.154.197.46:8081/repository/yum-aliyun-group/

主机测试

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

替换http://mirrors.aliyun.com/centos/–>http://43.154.197.46:8081/repository/yum-aliyun-group/

/etc/yum.repos.d/CentOS-Base.repo

[base]name=CentOS-$releasever - Base - mirrors.aliyun.comfailovermethod=prioritybaseurl=http://43.154.197.46:8081/repository/yum-aliyun-group/$releasever/os/$basearch/        http://43.154.197.46:8081/repository/yum-aliyun-group/$releasever/os/$basearch/        http://43.154.197.46:8081/repository/yum-aliyun-group/$releasever/os/$basearch/gpgcheck=1gpgkey=http://43.154.197.46:8081/repository/yum-aliyun-group/RPM-GPG-KEY-CentOS-7#released updates[updates]name=CentOS-$releasever - Updates - mirrors.aliyun.comfailovermethod=prioritybaseurl=http://43.154.197.46:8081/repository/yum-aliyun-group/$releasever/updates/$basearch/        http://43.154.197.46:8081/repository/yum-aliyun-group/$releasever/updates/$basearch/        http://43.154.197.46:8081/repository/yum-aliyun-group/$releasever/updates/$basearch/gpgcheck=1gpgkey=http://43.154.197.46:8081/repository/yum-aliyun-group/RPM-GPG-KEY-CentOS-7#additional packages that may be useful[extras]name=CentOS-$releasever - Extras - mirrors.aliyun.comfailovermethod=prioritybaseurl=http://43.154.197.46:8081/repository/yum-aliyun-group/$releasever/extras/$basearch/        http://43.154.197.46:8081/repository/yum-aliyun-group/$releasever/extras/$basearch/        http://43.154.197.46:8081/repository/yum-aliyun-group/$releasever/extras/$basearch/gpgcheck=1gpgkey=http://43.154.197.46:8081/repository/yum-aliyun-group/RPM-GPG-KEY-CentOS-7#additional packages that extend functionality of existing packages[centosplus]name=CentOS-$releasever - Plus - mirrors.aliyun.comfailovermethod=prioritybaseurl=http://43.154.197.46:8081/repository/yum-aliyun-group/$releasever/centosplus/$basearch/        http://43.154.197.46:8081/repository/yum-aliyun-group/$releasever/centosplus/$basearch/        http://43.154.197.46:8081/repository/yum-aliyun-group/$releasever/centosplus/$basearch/gpgcheck=1enabled=0gpgkey=http://43.154.197.46:8081/repository/yum-aliyun-group/RPM-GPG-KEY-CentOS-7#contrib - packages by Centos Users[contrib]name=CentOS-$releasever - Contrib - mirrors.aliyun.comfailovermethod=prioritybaseurl=http://43.154.197.46:8081/repository/yum-aliyun-group/$releasever/contrib/$basearch/        http://43.154.197.46:8081/repository/yum-aliyun-group/$releasever/contrib/$basearch/        http://43.154.197.46:8081/repository/yum-aliyun-group/$releasever/contrib/$basearch/gpgcheck=1enabled=0gpgkey=http://43.154.197.46:8081/repository/yum-aliyun-group/RPM-GPG-KEY-CentOS-7

允许匿名用户yum下载。

yum -y install httpd

查看已经缓存下来的包

其他

一般配置多个proxy,一个hosts,一个group将hosts和proxy进行组合。

参考链接

原网站

版权声明
本文为[华为云]所创,转载请带上原文链接,感谢
https://bbs.huaweicloud.com/blogs/358906