Linux Essentials Tutorial 35-Package Management-yum

Source: Internet
Author: User
Tags yum repolist

Yum Basics

? ? Using RPM to install, uninstall software or services in Linux often encounter the dependence of RPM package, and we install software A, the hint depends on software B, when installing software B will be prompted to rely on a series of dependencies such as software C. At this point you will be able to ask whether there is a key to resolve all the dependencies during the installation of the problem? This is the time to show the power of the Yum command in Linux.
? ? Yum is all called Yellow dog Updater, Modified, the executable named Yum, is a shell front-end package management in Fedora/redhat/centos. It is based on RPM package management, can be multi-designated server automatically download RPM package and install, can automatically handle dependencies, and install all dependent packages at once, without having to download and install a variety of dependent packages.
? ? The main features of Yum are as follows:
? ? 1. Multiple repositories can be configured at the same time (Repository)
? ? 2. Concise configuration file (/etc/yum.conf)
? ? 3. Automatic resolution of dependency issues encountered in adding or removing installation RPM packages
? ? 4. Maintain consistency with RPM database

Yum uses the Yum command

? The general form of the Yum command is shown below:

yum [options] [command] [packages][options]:可选项  -h:使用帮助  -y:在安装过程中的所有提示全部选择yes  -q:不显示安装过程[command]:要进行的操作[packages]:操作对象
Yum Operating Software Installation
    • Yum Install: All installed
    • Yum Install package: installs the specified packages
    • Yum Groupinstall Group: Setup Groups Group
Update upgrade
    • Yum Update: All Updates
    • Yum Update package: Update specified packages
    • Yum check-update: Checking for updatable programs
    • Yum Upgrade Package: Upgrading the specified packages
    • Yum groupudate Group: Upgrade program groups
Find display
    • Yum Info Package: Display the installation pack packages information
    • Yum list: Displays all packages that are installed and can be installed
    • Yum List Package: Displays the status of the specified install packages
    • Yum GroupInfo Group: Displaying information about the group of programs
    • Yum grouplist: Show All program group information
    • Yum search string: Searching for the installation package based on the keyword string

Where the yum list subcommand looks like this:

Sub-command Description
Yum List all Show all packages that are installed and can be installed
Yum List avaiable Show all available Packages
Yum List Update Show all packages that can be upgraded
Yum List installed Show all installed Packages
Yum List Recent Show new packages added to the repository
Remove a program
    • Yum Remove Package: Remove Packages
    • Yum Groupremove Group: Removing a group of programs
    • Yum deplist Package: View dependencies for packages
Cache operations
    • Yum Clean Package: Clear the packages under the cache directory
    • Yum Clean all: Clear all caches
    • Yum Clean headers: Clear headers in the cache directory
    • Yum Clean oldheaders: Clears the old headers in the cache directory
    • Yum Makecache: rebuilding yum Cache
yum clean all=yum clean package;yum clean oldheaders:清除缓存目录中的软件包以及旧的headers
View the local repository list
    • Yum Repolist
Build local Yum resource pool

? ? In the CentOS system, we often install software, and many of the software has a variety of dependencies. And the system is provided by default is the online library, when the speed is not good or no network situation, what should we do? Let's try to build a local yum repository using the resource pool that comes with the system tray. Example of CentOS in VMware:

    1. Loading the CentOS system ISO into the virtual CD drive
    2. Mount the files in the virtual CD drive to the CentOS system
    3. Backup system comes with a repository configuration

    4. To create a local resource pool configuration file
  [LocalRepo] : 资源库名称  name:对资源库的描述  baseurl:资源库的实际地址,地址可以拥有三种形式:     本地配置:file://     FTP配置:ftp://     HTTP配置:http://  enabled:表示是否启用该资源库,1:代表启用;0:代表未启用  gpgcheck:表示是否校验软件的key,1:代表校验;0:代表不校验  gpgkey:表示校验的Key文件位置,这个Key是指发行版数字签名公钥文件
说明:一般创建本地的资源库,gpgcheck:一般选择不校验,因此gpgkey也无须填写Key文件路径

5. View the list of locally enabled repositories

6. Search for packages in the repository

7. Install a software with Yum

如果能正常安装软件,则代表本地资源库配置成功。

This article is posted on the subscription number, such as your friends like my article, you can also follow my subscription number: Woaitest, or scan the following QR code to add attention:

Linux Essentials Tutorial 35-Package Management-yum

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.