Introduction to yum source management configuration

Summary: yum is an rpm-based package manager that enables system administrators to interact and automate finer and more detailed management of RPM packages, automatically download and install RPM packages from specified servers, automatically handle dependencies, and Install all dependent software packages at one time, without having to download and install tediously again and again.

yum is an rpm-based package manager that enables system administrators to interact and automate finer and more detailed management of RPM packages, automatically download and install RPM packages from specified servers, automatically handle dependencies, and install them once All dependent software packages do not need to be downloaded and installed again and again.

YUM: YellowdogUpdate Modifier, rpm's front-end program, used to resolve software package dependencies, can locate software packages between multiple libraries, yum replaces up2date
yum repository (warehouse) yum repo (file defines one or more software The details of the repository, such as where we will download packages that need to be installed or upgraded, the settings in the repo file will be read and applied by yum).

After we install the Centos system, we usually manually change the configuration file of the yum source (the default source speed may not be ideal). This article introduces the meaning of the configuration parameters in the yum source file.

yum client configuration file:

/etc/yum.conf: Provides common configuration for all repositories (generally does not change here)

/etc/yum.repos.d/*repo: Provides configuration for

repository pointing Definition of repository pointing:

* .repo A file ending with repo, you can configure multiple repositories ending with .repo!

[base]
[repositoryID]: the name of the repository
name=explanation of the name, describing the basic information of the repository
baseurl=url://path/to/repository/: repository address, local or http/ftp/file
enabled={1|0} is enabled by default (this repository is disabled when 0)
gpgcheck={1|0}: check packages Signature, check by default (1), 0 means do not check the source (do not write this line to check by default)
gpgkey=URL
enablegroups={1|0}: enable group
failovermethod={roundrobin|priority}
roundrobin random meaning (there can be multiple Warehouse baseurl, use roundrobin to randomly select warehouses to prevent some warehouses from being unusable due to problems)
exactaich={1|0}: Is it the exact architecture (64-bit installs 32-bit)
obsoletes={1|0}: Abandoned, some are abandoned Whether the package is installed
plugins={1|0}: Enable plugin
installonly_limit=5: Up to 5 yum can be installed at the same time (5 simultaneous installations are allowed in parallel, must be in the same terminal)

Disable warehouse: yum-config-manager --disable "Warehouse Name "
enable repository: yum-config-manager --enable "repository name" to

clear the yum cache, sometimes an error occurs during installation, if necessary, clear the cache (clean the cache after modifying yum): #yum clean all

View the list of warehouses : #yum repolist

Fuzzy search: #yum list tr*

Reinstall package: reinstall Package name example: #yum reinstall tree

Install the package: install Package name example: #yum install tree (plus the -y option to directly confirm the installation)

Uninstall the package: remove Package name example: #yum remove tree

View package information: info Package name example: #yum info tree

yum Log file path: /var/log/yum.log

Installation package group: Example: #yum groupinstall "Development Tools"

Use variables to automatically determine the current Centos version: $basearch



Attach the yum source of Netease and the yum source of nginx, and update it later More sources will be sorted out when this article is in!

Simply #wget under /etc/yum.repos.d (back up the original source #mkdir bak #mv Centos* bak)

wget http://blog.whsir.com/uploads/nginx.repo The address inside is nginx official yum source

wget http://blog.whsir.com/uploads/CentOS6-Base-163.repo Note that it corresponds to your current version! ! !

wget http://blog.whsir.com/uploads/CentOS7-Base-163.repo Pay attention to your current version! ! !

wget http://blog.whsir.com/uploads/CentOS5-Base-163.repo Pay attention to your current version! ! !



Attach Ali's yum source

Simply #wget under /etc/yum.repos.d (back up the original source #mkdir bak #mv Centos* bak)

wget http://down.whsir.com/downloads/Centos-5.repo

wget http://down.whsir.com/downloads/Centos-6.repo

wget http://down.whsir.com/downloads/Centos-7.repo


Use Yunqi Community APP, comfortable~

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326224104&siteId=291194637