YUM understanding in PHP

1. YUM What is that?

  1) Full name: Yellow dog Updater, Modified. Google translation: brown dog update, modify,

  2) Description Baidu: RedHat Fedora and is in a well in CentOS Shell distal package manager. Based on RPM package management, can automatically download from the specified server RPM package and installed, you can automatically handle dependencies, and install all packages depending on, again and again without the cumbersome download and installation.

What 2.YUM solve?

  Mainly to resolve the dependencies to install the software (package) is under linux.

  If the LAMP or too LNMP environment installed, install a package, you will need to install additional software to use. This led to the deployment of a project, you need to spend a lot of time to solve software dependencies involved, and often rely on the package is not one or two, but a considerable number of people to getting a headache job. When beginners start the installation, if not yum, but a separate download from the official website of each software package, and then install one by one, then we will deeply appreciate the value of the YUM.

What 3.YUM profiles have?

  1) Profile yum.conf

    > File Locations: /etc/yum.conf

    > Description:

$ cat /etc/yum.conf 
 
[main]
cachedir = / var / cache / yum #yum downloaded RPM package cache directory
keepcache = 0 # cache to save, save 1 and 0 are not saved.
debuglevel = 2 # debug level (0-10), the default is 2 (application specific debug level, I do not understand).
Position logfile = / var / log / yum.log #yum log files are located
exactarch = 1 # when updated, whether to permit update a different version of the RPM package, such as whether to update the RPM package i686 on i386.
obsoletes = 1 # This is an update of parameters, please refer to the specific yum (8), simply put, is equivalent to the upgrade, it allows updating the old RPM package.
gpgcheck = 1 # Check whether GPG (GNU Private Guard), one kind of the signature key mode.
plugins = 1 # whether to allow the use of plug-ins, the default is 0 is not allowed, but we usually use yum-fastestmirror this plugin.
installonly_limit = 3 # How many cores allow package reserved.
exclude = selinux * # shield not want to update the RPM package, available wildcard, and a plurality of spaces between separate packages RPM.
#       This is the default, if you make this bigger yum won't see if the metadata
# is newer on the remote and so you'll "gain" the bandwidth of not having to
# download the new metadata and "pay" for it by yum not having correct
# information.
# It is esp. important, to have correct metadata, for distributions like
# Fedora which don't keep old packages around. If you don't like this checking
# interupting your command line usage, it's much better to have something
# manually check the metadata once an hour (yum-updatesd will do this).
# metadata_expire=90m
# PUT YOUR REPOS HERE or IN separate files named file.repo
# in /etc/yum.repos.d

  2) * .repo file

  > File Locations: /etc/yum.repos.d/ * .repo

  in yum repo file is Fedora source (depot) configuration file, usually a repo file defines the details of the contents of one or more depots, for example, where we will need to download or install the upgrade package, set the repo files content will be read and applied yum!

[Fedora] # square brackets is the name of the software source, will be identified and acquired yum

name = Fedora $ releasever - $ basearch # here also defines the name of the depots, usually in order to facilitate reading the configuration file, generally no effect, $ releasever variables define the release, usually 8,9,10 and other digital, $ basearch variable defines the architecture of the system, which can be i386, x86_64, ppc equivalent, these two variables, depending on the version of the current system architectures have different values, which can be easily selected at the time yum upgrade package for the current system. the same ......
failovermethod = priority #failovermethod two values ​​can be selected, priority is the default value, indicating the selection order of the addresses from the mirror server baseurl listed, the server generates a random selection of the RoundRobin listed
exclude = compiz * * compiz * fusion-icon * #exclude this option was later added to the list of my own, to prohibit certain packages to install and update software repository, you can use wildcards, separated by spaces, can as the case may need to add their own
#baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/
# This is the first character of the line baseurl '#' indicates that the line has been annotated, will not be read, this line is designated a baseurl means (mirror server address of the source)
#mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch
# Above this line is designated a mirror server address list, usually open, in this case added a note symbol disabled, we can try to replace $ releasever and $ basearch into their own corresponding versions and architectures, such as 10 and i386, opened in a browser, we can see a long list of mirror mirror server address list available.
Select the copy itself faster mirror server access address and paste it into repo file, we will be able to get faster update rate, and the format is as follows baseurl:
baseurl =
ftp://ftp.sfc.wide.ad.jp/pub/Linux/Fedora/releases/10/Everything/i386/os
http://ftp.chg.ru/pub/Linux/fedora/linux/releases/10/Everything/i386/os
http://ftp.yz.yamagata-u.ac.jp/pub/linux/fedora/linux/releases/10/Everything/i386/os
http://mirror.nus.edu.sg/fedora/releases/10/Everything/i386/os
http://mirror.yandex.ru/fedora/linux/releases/10/Everything/i386/os
http://ftp.twaren.net/Linux/Fedora/linux/releases/10/Everything/i386/os
http://ftp.itu.edu.tr/Mirror/Fedora/linux/releases/10/Everything/i386/os

enabled = 1 # This option indicates that the source is defined in the repo enabled, 0 to disable
gpgcheck = 1 # This option indicates that the repo will be downloaded rpm gpg check, the rpm package has been determined to be effective and safe source
gpgkey = file: /// etc / pki / rpm-gpg / RPM-GPG-KEY-fedora- $ basearch # gpg key defined for the verification, the public key is the location where the digital signature of the file!

## The following depots basically less than, the options are as above
[fedora-debuginfo]
name=Fedora $releasever - $basearch - Debug
failovermethod=priority
#baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/$basearch/debug/
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-debug-$releasever&arch=$basearch
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch

[fedora-source]
name=Fedora $releasever - Source
failovermethod=priority
#baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/source/SRPMS/
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-source-$releasever&arch=$basearch
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch

  The third point above configuration content, extracted from bloggers  hao_xiaoyu article, the article addresses: https://www.cnblogs.com/haoxiaoyu/p/3971363.html

[update] 2019-06-26 23:08:43

Guess you like

Origin www.cnblogs.com/renyong/p/11094461.html
yum