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 7.x)
- root-access
- a fast internet connection
Preliminary Note¶
Some basic information may be found atInstall 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-7 #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/ priority=10 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Repo | Section | Priority |
---|---|---|
iRedMail.repo | iRedMail | 5 |
CentOS-Base.repo | base | 10 |
CentOS-Base.repo | updates | 10 |
virtualbox.repo | virtualbox | 20 |
zabbix.repo | zabbix | 20 |
epel.repo | epel | 30 |
nux-dextop.repo | nux-dextop | 40 |
elrepo.repo | elrepo | 90 |
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 = 21 [adobe-linux-x86_64]
priority = 30 [epel]
priority = 40 [nux-dextop]
Von Jeremias Keihsler vor fast 8 Jahren aktualisiert · 1 Revisionen