The detailed use yum

 

What is yum

* yum = Yellow Dog Updater, Modified
* main function is more convenient to add / delete / update the RPM package.
* It can automatically resolve problems rely on the package.
* It's easy to manage a large number of system update problem

yum Features

* You can configure multiple resource library (repository)
* simple configuration file (/etc/yum.conf
* automatically resolve problems encountered when dependent add or remove rpm package
* easy
* to maintain consistency with the RPM database

yum install

* CentOS comes with (yum - * .noarch.rpm.)

# Rpm--ivh yum - .noarch.rpm *.

* before you first enable yum first need to import the system of GPG-KEY-RPM:

# Rpm---import / usr / report this content share / DOC / CentOS-Release-3 (4) / RPM-GPG-KEY-CentOS-3 (4)

yum command

* Note: when you first use yum or yum repository for updates, yum will automatically download all required headers placed at / var / cache / yum directory, the time required may be longer.

update package rpm

* rpm package check can update

#yum update check-

* update all packets rpm

Update # yum

* Updates the specified rpm package, such as updating Source kernel and kernel

# yum Update kernel kernel-Source

* massive upgrade with yum update is different, even the old out of the package upgrade

# yum upgrade

the rpm package installation and removal

* install the rpm package, such as MP3-xmms

# yum install xmms-MP3

* delete the rpm package, including the package has a dependent of a package

# yum the Remove for licq

* Note: while you will be prompted to delete licq-gnome, licq- Qt, for licq-text

yum scratch (/ var / cache / yum / ) relevant parameters

* Clear the temporary file rpm package

#yum Clean packages

* Clear the temporary file header rpm

#yum clearn headers

* remove the old temporary the rpm header file

# yum Clean oldheaders

* Clear temporarily stored in the header file and the old rpm package file

#yum clearn All or #yum clearn

* Note: the equivalent yum clean packages oldheaders + yum clean

packages list

* list all repository It can be installed or updated package rpm

List # yum

* listed specific repository can be installed or updated and installed rpm package

# yum List mozilla
# yum List mozilla *

* Note: You can use matching symbols on the rpm package name, such as listing all begin with mozilla rpm packages

* List repository can update all rpm packages

# yum List the updates

* List all installed rpm packages

# yum List installed

* listed rpm package has been installed but is not included in the repository

# List Extras yum

* Note: download and install via other sites rpm package

rpm package information display (info parameter with List)

* List all information repository can install or update rpm package

#yum info

repository specific * lists or may be installed and the update information package installed rpm

#yum info mozilla
#yum info mozilla *

* NOTE: rpm may be used in the package name sign, as listed All the beginning mozilla rpm package

* List the repository of all information that can be updated rpm package

# yum info the updates

* lists information about all rpm packages installed

#yum info installed

* Information rpm package listed has been installed but is not included in the repository

# yum info Extras

* Note: download and install via other sites rpm package information

search rpm package

* search for matching specific character of the rpm package

#yum search mozilla

* Note: rpm package name, package description, etc. Search

* Search there rpm package contains a specific file name

#yum provides realplay

increase repository

* For example: increase rpm.livna.org as a resource library

* installation Livna.org rpms GPG key

--import # Rpm- http://rpm.livna.org/RPM-LIVNA-GPG-KEY

* check the Key GPG

# RPM -qa gpg-pubkey *

* display Key information

# Rpm--qi gpg-pubkey-a109b1ec-3f6e28d5

* (Note: If you want to delete Key, use #rpm -e gpg-pubkey-a109b1ec- 3f6e28d5)

-------------------------------------------------- -------------------------------------------------- -------------------------------------------
yum default download site abroad , speed is often slower, in order to speed up the download speed of yum, yum "source" may be modified to mirror the domestic

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS- Base.repo.bak (make a backup first)
kate /etc/yum.repos.d/CentOS-Base.repo

will add the following code to paste into it, then save it.
[Base]
name =-the CentOS. 4 - Base
BaseURL = HTTP: //mirror.be10.com/centos/4/os/i386/
gpgcheck. 1 =

#released Updates
[Update]
name =-the CentOS. 4 - the Updates
BaseURL = HTTP: //mirror.be10.com/centos/4/updates/i386/
gpgcheck. 1 =

#packages Used / Produced in But Not Released The Build
[addons]
name=CentOS-4 - Addons
baseurl=http://mirror.be10.com/centos/4/addons/i386/
gpgcheck=1

#additional packages that may be useful
[extras]
name=CentOS-4 - Extras
baseurl=http://mirror.be10.com/centos/4/extras/i386/
gpgcheck=1

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-4 - Plus
baseurl=http://mirror.be10.com/centos/4/centosplus/i386/
gpgcheck=1
enabled=0

#contrib - packages by Centos Users
[contrib]
name=CentOS-4 - Contrib
baseurl=http://mirror.be10.com/centos/4/contrib/i386/
gpgcheck=1
enabled=0

#packages in testing
[testing]
name=CentOS-4 - Testing
baseurl=http://mirror.be10.com/centos/4/testing/i386/
gpgcheck=1
enabled=0

 

Reproduced in: https: //www.cnblogs.com/licheng/archive/2009/06/06/1497813.html

Guess you like

Origin blog.csdn.net/weixin_34402090/article/details/92632207