Linux Yum command

Source: Internet
Author: User

What is Yum?

Yum is the abbreviation for Yellowdog Updater modified. Yellowdog is a Linux distribution,rh that uses this upgrade technology to its own distribution to form the current yum, feeling that Yum and apt are similar in principle, but apt is compiled code that performs much more efficiently than using PYT Hon written by Yum. This is the homepage of Yum.

Yum's philosophy is to use a central repository (repository) to manage a subset of even a distribution of application relationships, and to perform related upgrades, installations, deletions, and so on, based on calculated software dependencies, reducing the headaches of Linux users Dependencies's problem. At this point, yum and apt are the same. Apt was originally used by Debian's deb-type software management, but it can now use the RPM under RH.

In general, this kind of software describes the corresponding repository network address through one or more configuration files, obtains the necessary information from repository by HTTP or FTP protocol, and downloads the related software package. In this way, local users can easily perform system upgrade and maintenance work when they have an Internet connection by creating descriptions of different repository. In addition, if you need to use proxies, you can use Http_proxy and ftp_proxy to set the standard environment variables inside the shell.

Repository is created with the Yum-arch or Createrepo command, or it can be mirrored with the repository that others already have, and this section explores how to build a repository.

Basic operation of Yum

The basic operation of Yum includes software installation (local, network), upgrade (local, network), uninstall, and a certain query function.

After setting up the local yum, it is easy to install it (now assuming that it is installed with FC5 's own yum), as we need to install the virtual machine Bochs, which can be used

# yum Install Bochs

If there is a relevant RPM file locally, you can use the

# yum Localinstall ur.rpm

The former causes Yum to search the data in the existing repository (typically connected to these repository to download the update data), and if this software is found, it analyzes its dependencies and then downloads and installs the required software.

If you need to uninstall, you can use

# yum Remove Bochs

Or

# Yum Erase Bochs

This will also dissolve the corresponding dependencies, such as deleting Firefox will also delete R, because R depends on Firefox

Updating a software can be used

# yum Update Firefox

If you do not have the following program name, all software that can be upgraded will be upgraded. Outdated software can add the--obsolete parameter if it needs to be processed (such as delete), or use upgrade. If you need to do something more automated (avoid answering some questions) you can also add some parameters, such as

# Yum-y Upgrade

If you do a system-level upgrade, you will download a lot of rpm and so on, which will take up more hard disk, you can use

# Yum Clean Packages

Delete the relevant RPM files, others have headers, packages, cache, metadata, all

See what RPM provides a program that can be used

$ yum provides/bin/rpm

and using

$ yum List rpm

Will list RPM-related information, and

$ yum List Info

Give a detailed explanation, you can use

$ Yum Search rpm

Get everything you can find with RPM-related programs, and the search object is the description section of each program.

For more detailed parameter descriptions please refer to the relevant man pages. The program called Yumdownloader can be found in the yum-utils. It can be easily downloaded, such as srpm and other packages

$ yumdownloader--source Firefox

How do I upgrade my FC with Yum?

The core part of the upgrade is very simple, first of all, it is necessary for Yum to manage its own version with the new REPOSITORY,FC with a RPM, which can be updated with the following command

# RPM-UVH Http://download.fedora.redhat.com/pub/fedora\

/linux/core/5/i386/os/fedora/rpms/fedora-release-5-5.\

noarch.rpm

After that, the FC4 related program was updated to FC5 with Yum,

# Yum-y Upgrade

Note that because some of their own installed programs do not have the relevant repository program replacement, it is likely to interfere with the process, such as Qterm, the original repository inside no, lazy way is to find the relevant repository and add to the Yum configuration file, The clumsy way is to unload these things first ... After a long wait (I did the download of the 1.5gb+ thing), you can look at a software update, and then reboot, with the new kernel boot success is almost done.

Some applications may not be able to handle the old version of the configuration file, you need to manually configure the basic on the line. And my fc5 grew out of the FC4.

FC itself has an update on the FAQ, you can refer to.

How to prepare Yum to add new repository?

This is primarily concerned with the configuration files of Yum. Its main configuration file is in/etc/yum.conf, and its description can be found here.

One of the important repository related information, in FC5, repository information is stored separately, generally in/tec/yum.repos.d/, generally a repository written a file, such as Fedora-core.repo.

Repository, which generally provides Yum upgrades on the web, will provide similar instructions, such as a DAG, which provides an RPM for installation, is configured with Yum on it, and can be used to perform system maintenance directly with the above commands, as well as dries, which can create a Dries.repo file with the content

[Dries]

Name=extra Fedora RPMs dries-$releasever-$basearch

Baseurl=http://ftp.belnet.be/packages/dries.ulyssis.org/redhat/el3/en/i386/dries

This general see will understand, do not repeat.

Some of the other tools

There are also some useful tools in yum-utils, such as package-cleanup for clearing locally installed RPMs, and some tools for maintaining repository, such as Repo-graph,repo-rss,repoclosure, Repomanage,repoquery,reposync,repotrack, YUM-BUILDDEP.

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.