Detailed methods for using Yum upgrades under Linux operating systems

Source: Internet
Author: User
Tags ftp ftp protocol

What is Yum?

Yum is the abbreviation of Yellowdog Updater modified.

Yellowdog is a Linux DISTRIBUTION,RH the upgrade technology to use their own distribution to form the current yum, the sense of Yum and apt is similar to the principle, but apt is compiled code, execution efficiency is much higher than the use of PYT The Yum written by Hon. This is Yum's homepage.

Yum's idea is to use a central warehouse (repository) to manage some or even a distribution application, and to perform related upgrades, installations, deletions, etc. based on the calculated software dependencies, reducing the number of Linux users who have been headaches Dependencies of the problem. On this point, Yum and apt are the same. Apt was originally used for Debian's Deb type software management, but it can now be used for the RH-under RPM.

Generally this kind of software describes the corresponding repository network address through one or more configuration files, obtains the necessary information from the repository through HTTP or FTP protocol, and downloads the relevant software packages. In this way, local users can establish a different repository description to facilitate system upgrade maintenance when there is an Internet connection. In addition, if you need to use proxies, you can use Http_proxy and ftp_proxy to set the standard environment variables inside these shells.

Repository is created with Yum-arch or CREATEREPO commands, and can be mirrored by someone else's existing repository, where the department explores how to build a repository.

Basic operation of Yum

Yum's basic operations include software installation (local, network), upgrades (local, network), uninstall, and a certain query function.

After setting up the local yum, it is easy to install (now assume that the fc5 with the Yum to install), such as we need to install virtual machine Bochs, you can use

# yum Install Bochs

If you have relevant RPM files locally, you can use the

# yum Localinstall ur.rpm

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

If you need to uninstall, you can use the

# yum Remove Bochs

Or

# Yum Erase Bochs

This will also eliminate the corresponding dependencies, such as the deletion of Firefox will delete R at the same time, because R depends on Firefox

Updating a software can use

# yum Update Firefox

If you do not have the following program name, you will upgrade all software that can be upgraded. Obsolete software can add--obsolete parameters, or use upgrade if it needs to be processed (if deleted). If you need to automate some of the actions (avoid answering some questions) you can add some parameters, such as

# Yum-y Upgrade

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

# Yum Clean Packages

The relevant RPM files will be deleted, others have headers, packages, cache, metadata, all

See what RPM provides a program that you can use

$ yum provides/bin/rpm

and use

$ yum List rpm

Will list RPM-related information, and

$ yum List Info

Give a detailed description, you can use

$ Yum Search rpm

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

Please refer to the relevant man pages for more detailed parameter descriptions. In the yum-utils can find the program called Yumdownloader. It can be easily downloaded, such as srpm and other packages

$ Yumdownloader--source Firefox

How do I upgrade my FC with Yum?

The core of the upgrade is very simple, first of all, you need to allow Yum to use the new REPOSITORY,FC management version also uses an RPM, you can use the following command to update the package

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

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

noarch.rpm

After that, we use Yum to update the FC4 related programs to FC5,

# Yum-y Upgrade

Note that because some of your own installed programs do not have the relevant repository program substitution, it is likely to interfere with this process, such as Qterm, the original repository inside did not, lazy way naturally is to find the relevant repository and add to the Yum of the configuration file, The clumsy way is to uninstall these things first ... After a long wait (what I did when I downloaded the 1.5gb+), I could look at one of the software updates, 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 line. My fc5 from the FC4.

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

How to prepare Yum Add new repository?

This mainly needs to care about the Yum configuration file. Its main configuration file is in/etc/yum.conf, and its description can be referenced here.

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

Online generally provide Yum upgrade repository will provide similar instructions, such as DAG, he provided the installation of RPM, installed on the Yum on the configuration, you can directly use the above command to perform system maintenance, as well as dries, you can establish a Dries.repo file, the content is

[Dries]

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

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

This is generally seen on the understanding, do not repeat.

Some of the other tools

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

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.