Projekt

Allgemein

Profil

Aktionen

Install Procedure for yum-priorities

Requirements

To install yum-priorities you will need the following:
  • a installed and supported operating system (e.g. CentOS 6.x)
  • root-access
  • a fast internet connection

Preliminary Note

Some basic information may be found at

Install yum-priorities

yum install yum-priorities

Configure yum-priorities

the configuration of yum-priorities happens by adding a priority setting to each repo-section

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

add to each enabled section a priority setting equal to 10

[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
priority=10
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

#released updates 
[updates]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
priority=10
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

Repo Section Priority
iRedMail.repo iRedMail 5
CentOS-Base.repo base 10
CentOS-Base.repo updates 10
pgdg-92-centos.repo pgdg92 20
virtualbox.repo virtualbox 20
zabbix.repo zabbix 20
rpmforge.repo rpmforge 30
epel.repo epel 40
nux-dextop.repo nux-dextop 50
adobe-linux-*.repo adobe-linux-* 60

Test

actually not a test, but this one-liner gives you a sorted output of repo's and their configured priority

sed -n -e "/^\[/h; /priority *=/{ G; s/\n/ /; s/ity=/ity = /; p }" /etc/yum.repos.d/*.repo | sort -k3n

should give you a output like
priority = 10 [base]
priority = 10 [updates]
priority = 20 [virtualbox]
priority = 30 [rpmforge]
priority = 40 [epel]
priority = 100 [adobe-linux-x86_64]

Von Jeremias Keihsler vor fast 8 Jahren aktualisiert · 2 Revisionen