„CentOS“ pagrindinėse repositorijose yra gana nedaug paketų, todėl vartotojams tenka pridėti papildomų paketų saugyklų. Viena jų – labai populiari RPM repositorija „RPMforge“.

Pirmiausia reikia pasirūpinti, kad aukštesnį prioritetą turėtų pradinės „CentOS“ repositorijos (angl. repository). T. y. paketai, esantys „base“, „updates“ ir kitose numatytose saugyklose, nebūtų diegiami iš „RPMforge“. Tai pasiekiama įdiegus du „

YUM“ įskiepius: „protectbase“ ir „priorities“:

[code lang=”shell”]yum install yum-protectbase yum-priorities[/code]

Įtraukti „RPMforge“ į

YUM paketų valdymo programos sąrašą nesudėtinga – tereikia parsisiųsti ir įdiegti paruoštą RPM paketą.

32 bitų operacinei sistemai siunčiamės:

[code lang=”shell”]wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm[/code]

Naujausią „RPMforge“ diegimo paketo versiją rasite čia.

Ir įdiegiame:

[code lang=”shell”]rpm -Uhv rpmforge-release-0.3.6-1.el5.rf.i386.rpm[/code]

Repositorijų failai saugomi specialiame „YUM“ kataloge /etc/yum.repos.d. Jeigu „RPMforge“ diegimas pavyko, šiame kataloge turėtumėte pamatyti naują failą – rpmforge.repo.

Dabar reikia pakoreguoti visus repositorijų failus taip, kad pagrindinės saugyklos būtų apsaugotos ir turėtų aukštesnį prioritetą. Žemiau pateikiami repositorijų konfigūracijos failai – reikalingi įtraukti kintamieji paryškinti.

CentOS-Base.repo

[code lang=”plain” highlight=”20,21,22,31,32,33,42,43,52,53,63,64,64,74,75″] # CentOS-Base.repo
#
# This file uses a new mirrorlist system developed by Lance Davis for CentOS.
# 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
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
protect=1
priority=1
exclude=perl-DBD-MySQL mysql* pidgin* libpurple*

#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=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
protect=1
priority=1
exclude=perl-DBD-MySQL mysql* pidgin* libpurple*

#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=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
protect=0
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=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
protect=0
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=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
protect=0
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=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
protect=0
priority=1[/code]

CentOS-Media.repo

[code lang=”plain” highlight=”22,23″] # CentOS-Media.repo
#
# This repo is used to mount the default locations for a CDROM / DVD on
#  CentOS-5.  You can use this repo and yum to install items directly off the
#  DVD ISO that we release.
#
# To use this repo, put in your DVD and use it with the other repos too:
#  yum –enablerepo=c5-media [command] #
# or for ONLY the media repo, do this:
#
#  yum –disablerepo=\* –enablerepo=c5-media [command] [c5-media] name=CentOS-$releasever – Media
baseurl=file:///media/CentOS/
file:///media/cdrom/
file:///media/cdrecorder/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
protect=0
priority=2[/code]

rpmforge.repo

[code lang=”plain” highlight=”10″] # Name: RPMforge RPM Repository for Red Hat Enterprise 5 – dag
# URL: http://rpmforge.net/[rpmforge] name = Red Hat Enterprise $releasever – RPMforge.net – dag
#baseurl = http://apt.sw.be/redhat/el5/en/$basearch/dag
mirrorlist = http://apt.sw.be/redhat/el5/en/mirrors-rpmforge
#mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge
enabled = 1
protect = 0
priority = 11
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
gpgcheck = 1[/code]

Beliko išvalyti laikiną „YUM“ talpyklą:

[code lang=”shell”]yum clean all[/code]

Ir atnaujinti paketų sąrašus:

[code lang=”shell”]yum upgrade[/code]