Linux Series Tutorials (12)--linux package management Yum Online management

Source: Internet
Author: User

Previous Blog we introduced RPM package Management RPM command Management, we found that when using the RPM command to manually install the RPM package, you will find that the installation encountered a dependency on the pain, you install a RPM will first install a dependent rpm, Installing this dependent RPM package is possible and must be installed before it depends. In practice, we will certainly not use the RPM command to manually install the package, the easier way is this blog we introduce the RPM package management--yum online management.

1. Yum Online Management

Yum (full name Yellow dog Updater, Modified) is a shell front-end package manager in Fedora and Redhat and SuSE. Based on RPM package management, the ability to automatically download RPM packages from specified servers and install them, automatically handle dependency relationships, and install all dependent software packages at once , without the hassle of downloading and installing them over and over again. Yum provides commands to find, install, and delete one, a group, or even all of the packages, and the commands are concise and well-remembered.

From the above explanation we can see that Yum Management is downloaded from the specified server (the network Yum source), so you must have a network or manually configure a local Yum source (no network is needed, and then explain how to configure it manually), and the most critical is that Yum can help us to resolve the dependency relationship.

2. Network Yum Source

On the installed Linux system, go to the/etc/yum.repos.d/directory:

  

In general, files ending in. Repo are all yum sources. If you can connect to the Internet, you will use Centos-base.repo as the default Yum source, if not networked we use Centos-media.repo as the local CD yum source.

To open Centos-base.repo with the VIM command:

  

View the contents of the Red box:

  

Mirrorlist and BaseURL's address is used to download the RPM package address, we use one of them. Because the default address is a foreign site, if it is too slow, you can change to the domestic Yum source address.

Like Ali's: Http://mirrors.aliyun.com/repo/Centos-7.repo

3, Common yum command ①, query all available packages list: Yum list

  

Note: This command queries all available packages on a well-provisioned Yum source server

②, querying server and keyword-related packages: Yum search keyword

  

③, yum installation package: Yum-y Install package name

Option:-y means answer yes automatically (if not added, each software installation will let you confirm whether the installation)

Install indicates installation

Example: Here is an example of installing the compiler gcc (the compiler must be used to install the source package later): yum-y install GCC

Without error, the following installation information indicates that the installation was successful:

  

Or after the installation is complete, input rpm-q gcc pops up with the following interface to indicate successful installation:

  

④, yum Upgrade package: Yum-y Update package name

Note: If you do not specify a package name, all packages in the system, including the Linux kernel, will be upgraded. After the Linux kernel upgrade is required to do some local configuration to boot, if the remote connection server for the Linux kernel upgrade, it is not possible to start the server.

⑤, yum Uninstall Package: Yum-y Remove Package Name

Note: Uninstall and upgrade are also the same, and since many of the packages have dependencies, you uninstall a, and B and C all depend on a, then both B and C are unloaded. If C and Linux a system software is dependent, and C also unloaded, may cause a system function can not be used. So we must be careful when uninstalling the software.

4. Yum Software Group Management

  

Installing a software group is much more convenient than installing a package on one of our packages.

  

This is in the Remote Desktop display is the Chinese information, if directly into the server query, the display is English, we need to install directly.

  

Linux Series Tutorials (12)--linux package management Yum Online management

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.