Repository paketlerinin önceliklendirilmesi

Sistemimizde birden fazla repository kullanıyorsak bunların önceliklendirilmesinde fayda vardır. Aradığımız paket önce işletim sistemimizin reposunda aranmalı sonrada sırasıyala diğer repolara bakılmalı. Bunun için aşağıdaki şekilde repolarımızı önceliklendiriyoruz.

öncelikle aşağıdaki komutla repolar arasında öncelik vermeye yarayan paketi yüklüyoruz.

yum install yum-priorities

Paketimizi yükledikten sonra aşağıdaki komutla “Centos-Base.repo” dosyasına öncelik vermek için gerekli konfigürasyonları yapıyoruz.

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

Açılan dosyamızın içinde köşeli parantezler içinde “base,updates,extras,centosplus” gibi başlıklar göreceksiniz. Bunlar yum deposunun alt depolarıdır. Bu depoların son satırlarına “Priority = 1” ifadesini ekleyiniz. Bu işlem ile birlikte bu depoya öncelik vermiş olursunuz…

Örnek:

#CentOS-Base.repo
#The mirror system uses the connecting IP address of the 
#client and the update status of each mirror to pick mirrors 
#that are updated to and geographically close to the client.  
#You should use this for CentOS updates unless you are 
#manually picking other mirrors.
#If the mirrorlist= does not work for you, as a fall back you 
#can try the remarked out baseurl= line instead.

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

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

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
priority=1

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
priority=1

Sisteminizde yüklü ise Epel deposunu konfigüre etmek için aşağıdaki komutunu giriniz ve bunada “Priority = 2” değerini veriniz.

Örnek:

[epel]
name=Extra Packages for Enterprise Linux 7 - $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
priority=2

[epel-debuginfo]
name=Extra Packages for Enterprise Linux 7 - $basearch - Debug
#baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch/debug
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-7&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1
priority=2

[epel-source]
name=Extra Packages for Enterprise Linux 7 - $basearch - Source
#baseurl=http://download.fedoraproject.org/pub/epel/7/SRPMS
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-source-7&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1
priority=2



Bu yazı

tarihinde

tarafından oluşturulmuştur.

Yazı kategoris :

Etiketler :


Yorumlar

Yorum bırakın