RHEL/centos 6.0 uses third-party software libraries (epel and rpmforge and rpmfusion software libraries)

Source: Internet
Author: User
When RHEL/centos 5.5 uses a third-party software library (epel, rpmforge, rpmfusion software library) to run Yum install flash-plugin or yum install mplayer in centos, the system prompts that this software is not found in the library? Why? Because centos is compiled by RHEL, it removes all copyright issues. Therefore, many software cannot be directly installed using Yum install without using a third-party software library.
The epel (extra packages for Enterprise Linux) software library provides a ora component that is recompiled for EL4 and el5. This software library has worked hard without replacing system components. In some cases, it tries to solve the problem of centos compatibility directly, but it firmly denies the compatibility between software libraries as one of the goals. When it is used together with other third-party software libraries, problems may occur. Therefore, when you use epel, especially when you use components of other component libraries, make sure that you use the yum priorities plug-in.
The rpmforge library now has more than 10000 centos software packages, which is considered by the centos community as the safest and most stable third-party software library.
Next, let me explain how to use epel, rpmforge, and rpmfusion software repositories:
1. Install the Yum-priorities plugin.
This plug-in is used to set the order in which Yum calls the software source. Because the official software sources are relatively stable and recommended. Therefore, the order of the official source is higher than that of the third source. To ensure this order, you need to install the Yum-priorities plug-in.
[Root @ centos ~] # Yum install Yum-priorities # Install Yum-Priorities
After installation, you need to set/etc/yum. repos. d/directory. repo-related files, such as CentOS-Base.repo, insert sequence instructions in these files: Priority = n (n is a positive integer from 1 to 99, the smaller the value, the higher priority)

The general configuration is as follows:

[Base], [Addons], [updates], [extras]… Priority = 1
[Centosplus], [contrib]… Priority = 2
Third-party software source: Priority = n (n> 10 recommended)

For example, my CentOS-Base.repo configuration is:

# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and
# Update Status of each mirror to pick mirrors that are updated to and
# Geographically close to the client. You shoshould use this for centos updates
# Unless you are manually picking other mirrors.
#
# If the specified list = does not work for you, as a fall back you can try
# Remarked out baseurl = line instead.
#
#
[Base]
Name = centos-$ releasever-Base
Using list = http://mirrorlist.CentOS.org /? Release = $ releasever & arch = $ basearch & repo = OS
# Baseurl = http://developer.centos.org/centos/?releasever/ OS /?basearch/
Gpgcheck = 1
Gpgkey = file: // etc/pki/rpm-GPG/RPM-GPG-KEY-CentOS-5
Priority = 1
# Released updates
[Updates]
Name = centos-$ releasever-Updates
Using list = http://mirrorlist.CentOS.org /? Release = $ releasever & arch = $ basearch & repo = updates
# Baseurl = http://developer.centos.org/centos/?releasever/updates/?basearch/
Gpgcheck = 1
Gpgkey = file: // etc/pki/rpm-GPG/RPM-GPG-KEY-CentOS-5
Priority = 1
# Packages used/produced in the build but not released
[Addons]
Name = centos-$ releasever-Addons
Using list = http://mirrorlist.CentOS.org /? Release = $ releasever & arch = $ basearch & repo = Addons
# Baseurl = http://developer.centos.org/centos/?releasever/addons/?basearch/
Gpgcheck = 1
Gpgkey = file: // etc/pki/rpm-GPG/RPM-GPG-KEY-CentOS-5
Priority = 1
# Additional packages that may be useful
[Extras]
Name = centos-$ releasever-extras
Using list = http://mirrorlist.CentOS.org /? Release = $ releasever & arch = $ basearch & repo = extras
# Baseurl = http://developer.centos.org/centos/?releasever/extras/?basearch/
Gpgcheck = 1
Gpgkey = file: // etc/pki/rpm-GPG/RPM-GPG-KEY-CentOS-5
Priority = 1
# Additional packages that extend functionality of existing packages
[Centosplus]
Name = centos-$ releasever-plus
Using list = http://mirrorlist.CentOS.org /? Release = $ releasever & arch = $ basearch & repo = centosplus
# Baseurl = http://developer.centos.org/centos/?releasever/centosplus/?basearch/
Gpgcheck = 1
Enabled = 0
Gpgkey = file: // etc/pki/rpm-GPG/RPM-GPG-KEY-CentOS-5
Priority = 2
# Contrib-packages by centos users
[Contrib]
Name = centos-$ releasever-contrib
Using list = http://mirrorlist.CentOS.org /? Release = $ releasever & arch = $ basearch & repo = contrib
# Baseurl = http://developer.centos.org/centos/?releasever/contrib/?basearch/
Gpgcheck = 1
Enabled = 0
Gpgkey = file: // etc/pki/rpm-GPG/RPM-GPG-KEY-CentOS-5
Priority = 2

2. download and install the epel RPM package
1. download and install the epel RPM package
32-bit System

[Root @ centos ~] # Rpm-IVH http://mirrors.ustc.edu.cn/fedora/epel/6/i386/epel-release-6-7.noarch.rpm

64-bit System

[Root @ centos ~] # Rpm-IVH http://download.fedora.redhat.co... ease-5-4.noarch.rpm

If you do not know your system kernel, run the uname-a command to view your kernel information.
2. Import the PGP key of the Dag.
[Root @ centos ~] # Rpm-import/etc/pki/rpm-GPG/RPM-GPG-KEY-EPEL-6
3. Set the source level in the/etc/yum. Repos. d/epel. Repo file to add priority = 11.
For example, the content of my epel. Repo file:

[Epel]
Name = extra packages for Enterprise Linux 5-$ basearch
# Baseurl = http://download.fedoraproject.org/pub/epel/5/?basearch
Using list = http://mirrors.fedoraproject.org/mirrorlist? Epel-5 & arch = $ basearch
Failovermethod = Priority
Enabled = 1
Gpgcheck = 1
Gpgkey = file: // etc/pki/rpm-GPG/RPM-GPG-KEY-EPEL
Priority = 11
[Epel-debuginfo]
Name = extra packages for Enterprise Linux 5-$ basearch-Debug
# Baseurl = http://download.fedoraproject.org/pub/epel/5/$basearch/debug
Using list = http://mirrors.fedoraproject.org/mirrorlist? Epel-debug-5 & arch = $ basearch
Failovermethod = Priority
Enabled = 0
Gpgkey = file: // etc/pki/rpm-GPG/RPM-GPG-KEY-EPEL
Gpgcheck = 1
[Epel-source]
Name = extra packages for Enterprise Linux 5-$ basearch-Source
# Baseurl = http://download.fedoraproject.org/pub/epel/5/SRPMS
Using list = http://mirrors.fedoraproject.org/mirrorlist? Epel-source-5 & arch = $ basearch
Failovermethod = Priority
Enabled = 0
Gpgkey = file: // etc/pki/rpm-GPG/RPM-GPG-KEY-EPEL
Gpgcheck = 1

3. download and install the rpmforge RPM package
1. Download The rpmforge RPM package
32-bit System

[Root @ centos ~] # Wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm

Or directly use the rpm-IVH http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm (skip steps 2-4 below)

64-bit System

[Root @ centos ~] # Wget http://packages.sw.be/rpmforge-r... 1. el5.rf. x86_64.rpm

2. Install the PGP key of the Dag.

[Root @ centos ~] # Rpm-import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt

3. Verify rpmforge's RPM file package

[Root @ centos ~] # Rpm-K rpmforge-release-0.5.1-1.el5.rf. *. rpm

4. Install rpmforge's RPM package

[Root @ centos ~] # 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 add priority = 12.
For example, the content of my rpmforge. Repo file:

### 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/rpmforge
Using list = http://apt.sw.be/redhat/el5/en/mirrors-rpmforge
# Prepare list = file: // etc/yum. Repos. d/mirrors-rpmforge
Enabled = 1
Protect = 0
Gpgkey = file: // etc/pki/rpm-GPG-key-rpmforge-Dag
Gpgcheck = 1
Priority = 12

4. download and install the rpmfusion RPM package
(Centos officially said that the software in this software library is not as stable as rpmforge! Rpmfusion official site: http://rpmfusion.org)

[Root @ centos ~] # Rpm-uvh http://download1.rpmfusion.org/free/el/updates/testing/5/i386/rpmfusion-free-release-5-0.1.noarch.rpm
[Root @ centos ~] # Rpm-uvh http://download1.rpmfusion.org/n... se-5-0.1.noarch.rpm

V. Test
1. Test and upgrade
[Root @ centos ~] # Yum check-Update
The output information should have the following two rows:
Loading "priorities" plugin
...
XX packages excluded due to repository priority Protections
2. Try installing mplayer. If the installation is successful, there will be no problem.
[Root @ centos ~] # Yum install mplayer

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.