How to upgrade yum in Linux

Source: Internet
Author: User
Article Title: Detailed method for using yum upgrade in Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

  What is yum?

Yum is the abbreviation of yellowdog updater modified. Yellowdog is a Linux distribution. RH uses this upgrade technology to build its own distribution to form the current yum. The principle of yum is similar to that of apt, but apt is used to compile code, the execution efficiency is much higher than the yum written in python. This is the home page of yum.

Yum uses a repository to manage the relationship between some or even a distribution application, and upgrades, installs, deletes, and so on based on the calculated software dependency, this reduces the dependencies problem that Linux users have always suffered. At this point, yum and apt are the same. Apt is originally used by deb software management of debian, but now rpm under RH can be used.

Generally, this type of software uses one or more configuration files to describe the corresponding repository network address, obtain necessary information from repository as needed through http or ftp protocol, and download related software packages. In this way, local users can easily perform system upgrade and maintenance when there is an Internet connection by establishing different repository descriptions. In addition, if you need to use a proxy, you can use http_proxy and ftp_proxy to set the standard environment variables in the shell.

The repository is created using the yum-arch or createrepo command. You can also use the existing repository of others as an image. Here we will discuss how to create a repository.

  Basic yum operations

Basic yum operations include software installation (local, network), upgrade (local, network), uninstall, and some query functions.

After setting the local yum, you can easily install it (now we assume that the yum that comes with fc5 is used for installation). If you need to install the Virtual Machine bochs, you can use

# Yum install bochs

If there are related rpm files locally, you can use

# Yum localinstall ur. rpm

The former causes yum to search for the data in the existing repository (usually connect to the repository to download the updated data first). If this software is found, it analyzes its dependencies and then downloads and installs the required software.

You can use

# Yum remove bochs

Or

# Yum erase bochs

This will also eliminate the corresponding dependencies. For example, deleting firefox will delete R at the same time, because R depends on firefox.

Update a software available

# Yum update firefox

Without the subsequent program name, all software that can be upgraded will be upgraded. If obsolete software needs to be processed (such as deleted), you can add the -- obsolete parameter or use upgrade. If you want to automate some operations (to avoid answering some questions), you can also add some parameters, such

# Yum-y upgrade

If a system-level upgrade is completed, a large number of rpm and other things will be downloaded, which will occupy a lot of hard disks and can be used.

# Yum clean packages

Delete related rpm files. Others include headers, packages, cache, metadata, and all.

Check which rpm provides a program to use

$ Yum provides/bin/rpm

And use

$ Yum list rpm

Will list rpm-related information, and

$ Yum list info

Provides detailed instructions, which can be used

$ Yum search rpm

Get all rpm-related programs that can be found. The searched object is the description of each program.

For more detailed parameter descriptions, see related man pages. In yum-utils, you can find the program named yumdownloader. It can be used for convenient download, such as srpm and other packages.

$ Yumdownloader -- source firefox

How can I use yum to upgrade my fc?

The core part of the upgrade is very simple. First, you need to enable yum to use the new repository. fc also uses an rpm for managing its own version. You can use the following command to update this package:

# Rpm-Uvh http://download.fedora.redhat.com/pub/fedora \

/Linux/core/5/i386/OS/Fedora/RPMS/fedora-release-5-5 .\

Noarch. rpm

Later, I used yum to update fc4-related programs to fc5,

# Yum-y upgrade

Note that some self-installed programs are not replaced by related repository programs, so it is likely to interfere with this process, such as qterm, which is not in the original repository, the way to be lazy is to first find the relevant repository and add it to the yum configuration file. The clumsy way is to uninstall these things first ...... After a long wait (I downloaded 1.5 Gb + stuff that I did), I can watch software updates one by one and then restart the system, the success of using the new kernel boot is almost complete.

Some applications may not be able to process the configuration files of earlier versions. You just need to manually configure the files. My fc5 grew out of fc4 like this ~

The FC has an update FAQ. For more information, see.

  How to configure yum to add a new repository?

This requires you to focus on the yum configuration file. Its main configuration file is in/etc/yum. conf. For instructions, refer to here.

The important information is repository. In fc5, the repository information is stored separately, generally in/tec/yum. repos. d/inside, generally a repository written as a file, such as fedora-core.repo.

The repository that provides the yum upgrade on the Internet generally provides similar instructions, such as DAG, which provides the rpm for installation. After the configuration, yum is configured, you can directly use the following command to execute system maintenance, such as dries, you can create a dries. repo file, content is

[Dries]

Name = Extra Fedora rpms dries-$ releasever-$ basearch

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

I will understand this. I will not repeat it here.

  Some other tools

There are also some useful tools in yum-utils, such as package-cleanup for clearing locally installed rpm, 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.