Upgrading specific systems and software using Yum installation:
the article includes Yum configuration files and Repo detailed documentation, and will redhat5.1 Upgrade to redhat5.11 two parts .
First, yum installation view
Yum main function is more convenient to add/remove/update RPM package, automatically solve the problem of the dependency of the package, easy to manage a large number of system update problems.
Yum can also configure multiple resource libraries (Repository), Concise configuration files (/etc/yum.conf), and automatically resolve dependencies that are encountered when adding or removing RPM packages
To maintain consistency with the RPM database.
1, view the system default installation of the Yum
[root@localhostyum.repos.d]# rpm-qa|grep Yum
Packagekit-yum-0.5.8-26.el6.x86_64
Anaconda-yum-plugins-1.0-5.1.el6.noarch
Yum-metadata-parser-1.1.2-16.el6.x86_64
Yum-3.2.29-40.el6.centos.noarch
Yum-plugin-security-1.1.30-14.el6.noarch
Yum-utils-1.1.30-14.el6.noarch
Yum-plugin-fastestmirror-1.1.30-14.el6.noarch
Packagekit-yum-plugin-0.5.8-26.el6.x86_64
The base installation package for Yum includes:
Yum//rpminstaller/updater
Yum-fastestmirror//yumplugin which chooses fastest repository from a mirrorlist
yum-metadata-parser//afast metadata parser for Yum
2. Installation Yum
You can download the relevant package installation from the Internet via wget, or mount the system installation CD-ROM to install it, and install the installation disc on the Mount system.
[root@localhost/] # mount/dev/cdrom/mnt/cdrom/
[root@localhost/]# RPM-IVH yum-3.2.22-33.el5.centos.noarch.rpmyum-fastestmirror-1.1.16-14.el5.centos.1.noarch.rpmyum-metadata-parser-
1.1.2-3.el5.centos.i386.rpm
[root@localhost/]# Yum–v
Second, yum configuration
1. Description:
Yum's configuration file is divided into two parts: Main and repository
The main section defines the global configuration option, and the entire Yum configuration file should have only one main. Often located in/etc/yum.conf.
The repository section defines the specific configuration of each source/server and can have one or more. Often located in the files in the/ETC/YUM.REPO.D directory.
yum.conf files are generally located in the/etc directory, which typically contains only the configuration options for the main section.
which
The repo file is the configuration file for the Yum source (software warehouse) in Linux, and usually a repo file defines the details of one or more repositories, such as where we will
Download the packages that need to be installed or upgraded, and the settings in the repo file will be Yum read and applied.
Yum's work is not complicated, each RPM software's head (header) will record the software dependencies, if you can record the contents of the header and
And analysis allows you to know which underlying software each software needs to install before it is installed. In other words, on the server, first of all the RPM files in the analysis tool
Row analysis, and then record the analysis so that you can know all the associated software as long as you query the record's files before installing or upgrading. So Yum's basic
The work flow is as follows:
Server side: All the RPM packages are stored on the server, and then the dependencies of each RPM file are analyzed with the relevant functions, and the data is recorded as file storage
Placed in a specific directory on the server.
Client: If you need to install a software, first download the server record dependency file (available via WWW or FTP), through the server-side download records
Data for analysis, and then get all the relevant software, download all at once to install.
2, yum.conf documents detailed
[root@localhost~]# vi/etc/yum.conf
[Main]
cachedir=/var/cache/yum/$basearch/$releasever
#cachedir: Yum cached Directories, yum the RPM packages and databases downloaded in this store, typically/var/cache/yum/$basearch/$releasever.
Keepcache=0
#设置keepcache =1,yum retains the cached header files (headers) and packages after the package is successfully installed. The default value is keepcache=0 not saved
debuglevel=2
#debuglevel: Debug level, 0──10, defaults to 2
Logfile=/var/log/yum.log
#yum日志文件位置. Users can go to the/var/log/yum.log file to check for updates made in the past.
Pkgpolicy=newest
#pkgpolicy: Package policy. There are two options, newest and last, which is that if you set up multiple repository, the same software in different repository
, yum should install which, and if it is newest, then Yum will install the latest version. If this is last, then Yum sorts the server IDs alphabetically and chooses
Choose the last software installation on that server. Newest is usually chosen.
Tolerant=1
#tolerent, there are also 1 and 2 options that indicate whether Yum tolerate a package-related error with the command line, such as installing 1,2,3 three packages, 3 of which were previously
installed, if you set to 1, then yum error message will not appear. The default is 0.
Exactarch=1
#exactarch, there are two options 1 and 0 that represent whether to upgrade only the packages that are consistent with the CPU system of your installation package, if set to 1, then Yum will only install and system architecture matching soft
Package, for example,