1. Install the Yum-priorities plugin
1. Install the Yum-priorities plug-in and set it correctly to ensure the highest priority of the official library.
Yum-y install Yum-Priorities
2. Then, set/etc/yum. Repos. d/CentOS-Base.repo, add the Order Directive priority = n (n from 1 to 99,1 highest priority ),
Set priority = 1 for [base], [updates], [Addons], and [extras], for example:
Set [centosplus] and [contrib] to priority = 2.
2. download and install the epel RPM package
1. download and install the epel RPM package
32-bit: rpm-IVH http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
64-bit: rpm-IVH http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
2. Import the PGP key of the Dag
Rpm -- import/etc/pki/rpm-GPG/RPM-GPG-KEY-EPEL
3. Set the source level in/etc/yum. Repos. d/epel. Repo to priority = 11 (higher than above ).
3. download and install the rpmforge RPM package
1. Download The rpmforge RPM file package
32-bit: wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.i386.rpm
64-bit: wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm
2. Install the PGP key of the DAG (the method is inconsistent with the original text. If direct-Import fails, you can use the following method)
Wget http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt
Rpm -- import RPM-GPG-KEY.dag.txt
3. Verify rpmforge's RPM file package
Rpm-K rpmforge-release-0.5.1-1.el5.rf. *. rpm
4. Install rpmforge's RPM package
Rpm-I rpmforge-release-0.5.1-1.el5.rf. *. rpm
5. Set the source level in the/etc/yum. Repos. d/rpmforge. Repo file to priority = 12 (higher than above ).