Repository Manager之Nexus配置yum仓库
【摘要】 创建步骤创建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...
创建步骤
创建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.com
failovermethod=priority
baseurl=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=1
gpgkey=http://43.154.197.46:8081/repository/yum-aliyun-group/RPM-GPG-KEY-CentOS-7
#released updates
[updates]
name=CentOS-$releasever - Updates - mirrors.aliyun.com
failovermethod=priority
baseurl=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=1
gpgkey=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.com
failovermethod=priority
baseurl=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=1
gpgkey=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.com
failovermethod=priority
baseurl=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=1
enabled=0
gpgkey=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.com
failovermethod=priority
baseurl=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=1
enabled=0
gpgkey=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进行组合。
参考链接
【版权声明】本文为华为云社区用户原创内容,转载时必须标注文章的来源(华为云社区)、文章链接、文章作者等基本信息, 否则作者和本社区有权追究责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱:
cloudbbs@huaweicloud.com
- 点赞
- 收藏
- 关注作者
评论(0)