Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use yum to upgrade under Linux operating system

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly shows you "how to use yum upgrade under the Linux operating system", the content is easy to understand, clear, hope to help you solve your doubts, let the editor lead you to study and learn "how to use yum upgrade under the Linux operating system" this article.

What is yum?

Yum is the abbreviation of yellowdog updater modified.

Yellowdog is a Linux distribution,RH that uses this upgrade technology to its own distribution to form the current yum. The principle of yum is similar to that of apt, but apt is compiled code and its execution efficiency is much higher than that of yum written using python. This is the home page of yum.

The idea of yum is to use a central warehouse (repository) to manage the relationship between some or even one distribution application, and to upgrade, install, delete and so on according to the calculated software dependency, so as to reduce the dependencies problem that Linux users have been having a headache. At this point, yum is the same as apt. Apt was originally used by debian's deb type software management, but now it can also use rpm under the RH door.

Generally, this kind of software describes the network address of the corresponding repository through one or more configuration files, obtains the necessary information from repository through http or ftp protocol, and downloads the relevant software package. In this way, local users can easily upgrade and maintain the system when there is a repository connection by establishing different descriptions of Internet. In addition, if you need to use proxies, you can use the setting of standard environment variables in shell such as http_proxy and ftp_proxy.

Repository is created with the yum-arch or createrepo command, or you can use someone else's existing repository as a mirror. Here we discuss how to create a repository.

Basic operation of yum

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

Once the local yum is set, it is easy to install (now suppose we use the yum that comes with fc5). If we need to install the virtual machine bochs, we can use the

# yum install bochs

If you have a relevant rpm file locally, you can use the

# yum localinstall ur.rpm

The former causes yum to search for data in existing repository (usually connect to these repository to download updated data first), and if this software is found, it will analyze its dependencies and then download and install the required software.

If you need to uninstall, you can use the

# yum remove bochs

Or

# yum erase bochs

This will also deconstruct the corresponding dependencies, for example, deleting firefox will delete R at the same time, because R depends on firefox

Update a certain software can be used

# yum update firefox

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

# yum-y upgrade

If you finish a system-level upgrade, you will download a lot of rpm and other things, which will take up more hard drives and can be used

# yum clean packages

Delete related rpm files, others are headers, packages, cache, metadata, all

See what rpm provides that a program can use

$yum provides / bin/rpm

And use

$yum list rpm

Rpm-related information is listed, while

$yum list info

Give a detailed description, you can use the

$yum search rpm

Get all the rpm-related programs that can be found, and the search object is the description part of each program.

For more detailed description of the parameters, please refer to the relevant man pages. A program called yumdownloader can be found in yum-utils. It can be easily downloaded, such as srpm packages.

$yumdownloader-source firefox

How do I upgrade my fc using yum?

The core part of the upgrade is very simple. First of all, you need to enable yum to manage its own version with the new repository,fc and use a rpm. You can update this package 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, use yum to update fc4 related programs to fc5.

# yum-y upgrade

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

There may be some applications that can't handle the old version of the configuration file, so you just need to configure it manually. That's how my fc5 grew out of fc4.

FC itself has a FAQ about upgrading, which you can refer to.

How to configure yum to add a new repository?

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

Among them, the important one is the information related to repository. In fc5, the information of repository is stored separately, usually in / tec/yum.repos.d/, and generally a repository is written into a file, such as fedora-core.repo.

Repository that generally provides yum upgrades on the Internet will provide similar instructions, such as DAG, which provides rpm for installation. After installation, yum is configured, and you can directly use the above commands to perform system maintenance. For example, dries, you can create a dries.repo file that contains

[dries]

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

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

You can understand this when you see it, and I won't repeat it.

Some other tools

There are also some useful tools in yum-utils, such as package-cleanup for cleaning up locally installed rpm, and tools for maintaining repository, such as repo-graph,repo-rss,repoclosure,repomanage,repoquery,reposync,repotrack and yum-builddep.

The above is all the contents of the article "how to upgrade with yum under the Linux operating system". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report