Package management under CentOS--yum Chapter

Source: Internet
Author: User
Tags gpg
In the CentOS and Fedora Core distributions, a comprehensive management tool called Yum is used, and its full name is Yellowdog updater,modified, a tool that is not centos developed, but yellow Dog Integrated software package management tool for Linux development. As a package integrated management tool, in addition to Yum, there are up2date used by apt and red Hat Enterprise Linux for Debiangnu/linux.
Their common features are:

* Install and upgrade packages over the network
* Automatically resolve dependencies between packages
Note here that the package upgrades for Yum packages are not the latest packages, but CentOS security and stability, a system-integrated package that works well under CentOS, and updates on the latest package installation please refer to the package management--rpm under CentOS

★yum Use Preparation
Before using Yum, the most basic thing is to import GPG public key First, change also is the package download Web site (yum configuration file defined in the package download address).

GPG Public Key
RPM software packages have electronic signatures, using this electronic signature to determine whether the software package has been tampered with, the data is intact or not, because this is to import the development of the organization GPG public key. Then this GPG public key can be obtained from the package publishing station and Cd-rom/dvd-rom, installed under/usr/share/doc/centos-release-4/rpm-gpg-key under the system, and here is an identical file/usr /share/doc/centos-release-4/rpm-gpg-key-centos4. If you just use centos.org mirror site, then this public key is imported by default, on our website you can see that the unofficial library utilization, we also imported this GPG public key, reference http://www.centospub.com /make/newenv.html defines the operation of the unofficial library.
★ Import GPG The method of public key:
Path or network file #rpm –import Gpgkey

★ Update package download mirror address settings
cent0s Mirror in the site in many parts of the world, the default setting is centos.org, China mirror distribution in China's Shanghai, Hong Kong and Fujian. Modify package download mirror site is to improve package download speed.
Yum's setup file is/etc/yum.repos.d/centos-base.repo. About the content of the site changes please refer to the answer to the website moderator Chao "CentOS finally have a Chinese mirror!" "The article.
Here to remind users to change file settings, be sure to make a backup of the original file and then modify, or to comment out the original contents of the file, rather than delete or overwrite the original settings, and comments in the file, such as what time changes, who changed the content of the changes, and so on, which is good for the management of the system.

★ Use Yum Update system and software
In the configuration of this site Xiang solution, we have seen many times we have adopted the Yum installation software content.
For more information about using Yum, you can refer to the documentation for Fedore.clinux.org's use of yum management software.

★ Common Yum parameter options
How to use
Cases:
Upgrade:
#yum check-update
#yum Update software package (single package upgrade)
#yum-y update package (Upgrade all upgradeable packages)

Delete:
#yum Remove Package Name
#yum-y-Remove software package (function ibid, y to agree with all, than in the confirmation from one to the other, because the package friend dependencies, delete is likely to delete a lot of packages, do not have to confirm again.) Experience)

Installation:
#yum Install package Name
#yum-y Install package

Package Group Confirmation:
#yum grouplist (Confirm package Group, installed packages, for installed packages)
#yum Groupinstall "package Group" (Install Installable package Group)
Example: #yum-y groupinstall "X Window System" (Installation of basic window systems)


Options

Description Check-update Displays upgradeable package clean deletes the old header after downloading. and clean all the same clean oldheaders remove old headers Clean Packages Delete downloaded package info show available Package Info info Package name display specified package information install package name install specified package List shows the available package list installed shows the installed package list updates shows the packages that can be upgraded provides package name displays the file remove package name that is included in the package to delete the defined package, confirm the dependencies System. The Search keyword searches for packages using keywords. Search object is, RPM filename, Packager (package), dummary,description Update upgrades all upgradeable Package update package name upgrade specified package

Options

DescriptionGroupinstall Install the specified group Groupupdate installed group member package update grouplist the groups installed and the list of groups that can be installed Groupremove delete the specified group GroupInfo the packages that are included in the specified group display



Yum Application
Install a new software warehouse (Repository)
Function: Basic software warehouse (CentOS package library). Although there is a wealth of software, but some are not.
We are installing other software warehouses to address the actual package problems that are not included in the basic software warehouse.
CentOS4:
Copy content to Clipboard code: # wget http://dag.wieers.com/packages/rpmforge-release/rpmforge-release-0.3.6-1.el4.rf.i386.rpm
#rpm-UHV rpmforge-release-0.3.6-1.el4.rf.i386.rpm

CentOS5: Copy Content to Clipboard code: # wget http://dag.wieers.com/packages/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
# RPM-UHV RPMFORGE-RELEASE-0.3.6-1.EL5.RF.I386.RPM If there is a problem countermeasure (for reference only): Copy content to Clipboard code: # Vi/etc/yum.repos.d/rpmforge.repo

Enabled = 1

Enabled = 0← changed to 0 to avoid competitive usage with basic repositories: Copy content to Clipboard code: # yum-y--enablerepo=rpmforge Install package ← Package installation (in basic software warehouse Package installation not in) Fastestmirror plugin installation
Function: To automatically select the most suitable mirror site when downloading packages online. (Do not know Chinese tube no use, not tested) copy content to Clipboard code: # yum-y Install yum-fastestmirror proxy server settings:
Copy content to Clipboard code: # vi/etc/yum.conf

proxy=http://Server IP: Port ← Last line add

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.