Run yum in centos
When installing flash-plugin or yum install mplayer, why does the system prompt 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 use Yum without using a third-party software library.
Install.
Epel (extra packages
Enterprise Linux) The software library provides EL4
And EL5
Re-compiled Fedora
Component. This software library has worked hard without replacing system components. In some cases, it tries to directly target centos
Compatibility issues, but firmly denying the compatibility between software libraries is one of the goals. When it is used together with other third-party software libraries, problems may occur. Therefore, when you use epel
Make sure that you use yum
Priorities
Plug-ins.
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.
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://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
64-bit System
[Root @ centos ~] # Rpm-IVH http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-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
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://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.i386.rpm
64-bit System
[Root @ centos ~] # 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.
[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/nonfree/el/updates/testing/5/i386/rpmfusion-nonfree-release-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