Fedora Yum command

Source: Internet
Author: User
Tags gpg

I. What is yum?
Yum = yellow dog Updater, modified
The main function is to conveniently Add/delete/update RPM packages.
It automatically solves the dependency problem of the package.
It facilitates management of a large number of system update Problems
Note: The simplest reason for using Yum instead of APT is that ora comes

Ii. Yum features
* Multiple resource libraries (repository) can be configured simultaneously)
* Simple configuration file (/etc/yum. conf)
* Automatically solves the dependency problem when RPM packages are added or deleted.
* Easy to use
* Maintain consistency with the RPM Database

Iii. Install yum
Built-in ora
# Rpm-IVH yum-2.0.4-2.noarch.rpm

Iv. Yum Configuration
Note: you can modify and add the resource library in the configuration file to accelerate the download speed and have more updatable RPM packages.
Replace all content in/etc/yum. conf
[Main]
Cachedir =/var/Cache/yum
Debuglevel = 2
Logfile =/var/log/yum. Log
Pkgpolicy = newest
Distroverpkg = fedora-release
Tolerant = 1
Exactarch = 1

[Fedora-us-1]
Name = Fedora Core 1 -- fedora us mirror
Base url = ftp://mirrors.kernel.org/fedora.us/fedora/fedora/1/i386/yum/ OS

[Fedora-us-1-updates]
Name = Fedora Core 1 updates -- fedora us mirror
Base url = ftp://mirrors.kernel.org/fedora.us/fedora/fedora/1/i386/yum/updates

[Fedora-us-1-stable]
Name = Fedora Linux (stable) for Fedora Core 1 -- fedora us mirror
Base url = ftp://mirrors.kernel.org/fedora.us/fedora/fedora/1/i386/yum/stable

[Freshrpms]
Name = Fedora Linux $ releasever-$ basearch-freshrpms
Baseurl = http://ayo.freshrpms.net/fedora/linux/?releasever/?basearch/freshrpms

V. Yum Application
Note: When the yum or yum resource library is updated for the first time, yum will automatically download all the required headers and place them in the/var/Cache/Yum Directory, which may take a long time.

Check which update RPM packages are available
# Yum check-Update

Install the RPM package so that xmms can play MP3
# Yum install xmms-mp3

Install mplayer and install related software automatically
# Yum install mplayer

Delete the licq package and delete the packages that are dependent on the package.
# Yum remove licq
Note: You will also be prompted to delete licq-gnome, licq-QT, and licq-text, which is very convenient.

System update (update all RPM packages that can be upgraded, including kernel)
# Yum-y update

Perform system updates on a regular basis every day
# Chkconfig Yum on
# Service Yum start

6. Yum instructions
* Update the RPM package

Check the updatable RPM package
# Yum check-Update

Update all RPM packages
# Yum update

Update the specified RPM package, such as updating the kernel and kernel source
# Yum update kernel-Source

For large-scale version upgrades, unlike Yum update, the old obsolete package is also upgraded.
# Yum upgrade

* Installation and deletion of RPM packages

Install RPM packages like xmms-mp3
# Yum install xmms-mp3

Delete an RPM package, including packages that depend on the package
# Yum remove licq
Note: You will also be prompted to delete licq-gnome, licq-QT, and licq-text.

* Parameters related to Yum temporary storage (/var/Cache/Yum /)
Clear temporary RPM package files
# Yum clean packages

Clear temporary RPM header files
# Yum clean Headers

Clear the existing RPM header file
# Yum clean oldheaders

Clear existing RPM header files and package files
# Yum clean or # Yum clean all
Note: equivalent to Yum clean packages + Yum clean oldheaders

* RPM package list

List all RPM packages that can be installed or updated in the resource library
# Yum list

List specific rpm packages that can be installed, updated, and installed in the resource library
# Yum list Mozilla
# Yum list Mozilla *
Note: Match characters can be used in RPM package names, for example, to list all RPM packages starting with Mozilla

List all updates to the RPM package in the resource library
# Yum list updates

List all installed RPM packages
# Yum List Installed

List RPM packages installed but not included in the resource library
# Yum list extras
Note: download and install the RPM package from other websites

* RPM package information display (the info parameter is the same as the list)

Lists information about all RPM packages that can be installed or updated in the resource library.
# Yum info

Lists the specific information of RPM packages that can be installed or updated and installed in the resource library.
# Yum info Mozilla
# Yum info Mozilla *
Note: Match characters can be used in RPM package names, such as listing all RPM packages starting with Mozilla

Lists information about all the RPM packages that can be updated in the resource library.
# Yum info updates

Lists information about all installed RPM packages.
# Yum info installed

Lists the installed RPM packages that are not included in the resource library.
# Yum info extras
Note: Download the installed RPM package information from other websites.

* Search for an RPM package
Search for RPM packages matching specific characters
# Yum search Mozilla
Note: Search for RPM package names and package descriptions

Search for RPM packages with specific file names
# Yum provides realplay

7. Securely update the RPM package of freshrpms.net
Install the GPG key of freshrpms.net
# Rpm -- import http://freshrpms.net/packages/RPM-GPG-KEY.txt

Edit/etc/yum. conf and add the following information to the end.
[Freshrpms]
Name = Fedora Linux $ releasever-$ basearch-freshrpms
Baseurl = http://ayo.freshrpms.net/fedora/linux/?releasever/?basearch/freshrpms
Gpgcheck = 1

Note:
Check GPG key
# Rpm-Qa GPG-pubkey *

Show key information
# Rpm-Qi gpg-pubkey-e42d547b-3960bdf1

Delete key
# Rpm e gpg-pubkey-e42d547b-3960bdf1

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.