nexus yum 私服集成


nexus 集成了 yum 私服使用起來還是比較簡單的

配置 yum proxy

實際使用我們可能需要配置centos 以及epel 的源

centos可以用http://mirror.centos.org/centos/
epel 用http://mirrors.aliyun.com/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


參考資料

https://help.sonatype.com/repomanager3/yum-repositories


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM