Instalasi dan konfigurasi YUM priorities
Tutorial ini akan memberitahu anda bagaimana cara menginstal dan mengkonfigur YUM priorities di RHEL / CentOS, semoga bisa berhasil juga di Fedora. 😀
Install di CentOS 4
yum install yum-plugin-priorities
Install di CentOS 5
yum install yum-priorities
Pada file priorities.conf harus mengandung baris berikut:
[root@server ~]# cat /etc/yum/pluginconf.d/priorities.conf
[main]
enabled = 1
Sekarang lihatlah file konfigurasi repository anda, berikan angka prioritas dari 1-99, dimana repo dengan angka terendah akan mendapatkan prioritas utama, jadi umumnya semua repo CentOS saya set ke angka 1. Kemudian repo yang lain (EPEL, DAG, RPMForge, dll) saya berikan angka yang lebih besar. Hal itu dilakukan untuk memastikan paket-paket datang dari repo CentOS dulu, jika tidak ada baru kemudian YUM akan mengambil dari repo lain sesuai prioritasnya.
Dibawah ini saya perlihatkan file konfigurasi repo di CentOS saya, sebagai contoh bagaimana saya megkonfigurasinya.
[code lang='bash'] [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/ gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4 priority=1 #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 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4 priority=1 #packages used/produced in the build but not released [addons] name=CentOS-$releasever - Addons mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons #baseurl=http://mirror.centos.org/centos/$releasever/addons/$basearch/ gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4 priority=1 #additional packages that may be useful [extras] name=CentOS-$releasever - Extras mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras #baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/ gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4 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 #baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/ gpgcheck=1 enabled=0 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4 priority=1 #contrib - packages by Centos Users [contrib] name=CentOS-$releasever - Contrib mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib #baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/ gpgcheck=1 enabled=0 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4 priority=2 [/code]
Sumber: Techspotting.org