nexus-oss 私服集成yum

nexus 集成了 yum 私服使用起来还是比较简单的

配置 yum proxy

实际使用我们可能需要配置centos 以及epel 的源

centos可以用http://mirrors.ustc.edu.cn/centos/

epel 用http://mirrors.ustc.edu.cn/epel/

配置yum repo

nexus.repo /etc/yum.repos.d/
参考

[nexusrepo]
name=Nexus Repository
baseurl=http://hostip:8081/repository/yum-proxy/$releasever/os/$basearch/
enabled=1
gpgcheck=0
priority=1

nexus-epel.repo /etc/yum.repos.d/
参考

[nexus-epel-debuginfo]
name = Extra Packages for Enterprise Linux 7 - $basearch - Debug
baseurl = http://hostip:8081/repository/aliyun-epel/7/$basearch/debug
failovermethod = priority
enabled = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck = 0
[nexus-epel-source]
name = Extra Packages for Enterprise Linux 7 - $basearch - Source
baseurl = http://hostip:8081/repository/aliyun-epel/7/SRPMS
failovermethod = priority
enabled = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck = 0
[nexus-epel]
baseurl = http://hostip:8081/repository/aliyun-epel/7/$basearch
failovermethod = priority
gpgcheck = 0
name = EPEL YUM repo

测试效果

yum install -y php
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 为了减少公司内部大量vps使用外部yum源导致带宽不足情况,于是就搭建一台本地yum源服务器,通过脚本服务器定时去...
    聂扬帆博客阅读 2,524评论 1 7
  • 公网源 国防科技大学 https://mirrors.ustc.edu.cn/ 清华大学 https://mi...
    肖金光xjg阅读 648评论 1 2
  • 国内yum源的安装(163,阿里云,epel) ----阿里云镜像源 1、备份 mv /etc/yum.repos...
    moxiaoxiao阅读 565评论 0 0
  • 如果这会儿在家里,早上快九点还没起床,妈妈肯定叫了好几遍了,逢上休息的节假日,弟弟妹妹们肯定也会跟着凑热闹。 在这...
    橙子同学Alisa阅读 580评论 0 0
  • 最近,微博上的一则新闻引起了小编的注意,内容是这样的, 山西运城的张先生两月前被蚊子咬了一口,没想到脸肿得像篮球!...
    启恒数码阅读 249评论 0 2