1. Intruduction
YUMThe warehouse configuration first needs to have aYUMsource, which is the need to provide a storageRPMpackage and the correspondingRPMThe location of the analysis file, which can be a local directory,FTPServer orHTTPServer,NFSFile Server(The repository is both a ready directory containing the package and index files). YUMother third-party packages can also be placedYUMWarehouse, Repofile isYumSource(Software Warehouse)the configuration file,aRepofiles can define one or more repositories. YumEnables automatic positioning and acquisition of the correct package in the warehouse,The software repository includes allrpmBaotou Information(header)and Dependence, Clientwill be downloaded at the end of the first installationHeaderand analyze.
/etc/yum.repos.d/ is yum client Download the source profile directory, file name arbitrarily, to .repo yum How to call yum download the settings for the source. yum client You can configure multiple sources at the same time.
2. Configuration of the Yum client software warehouse
no matter what it is Yum Source, theyum client configures *.repo as long as the path containing the source is specified correctly (contains Packages and repodata directory):
baseurl= http:// mirrors.aliyun.com/centos/7/os/x86_64/ based on web server source of the build
baseurl= ftp://192. 168.0. 6/pub/server / based on ftp server yum source
baseurl=file:///mnt/rhel6.6 / /mnt/rhel6.6/ can be disc ,iso, or nfs mount point of file system (any directory containing source)
*.repo configuration file, you can directly download the configured files, such as
wget Http://mirrors.163.com/.help/CentOS6-Base-163.repo
you can also download and install the corresponding file containing the rpm Package, or manual configuration, regardless of the form of the package is added by the /etc/yum.repos.d/ directory *.repo 's configuration file.
3. Example
Cat /etc/yum.repos.d/ Openclient-community.repo
[Occ-auto]
Name=packages Built and maintained by the Open Client Community
Baseurl=http://pokgsa.ibm.com/projects/o/openclient/yum/6.00/rhel6/occ
Failovermethod=priority
Enabled=1
Gpgcheck=1
Gpgkey=file:///usr/share/doc/openclient-release/rpm-gpg-key-openclient
Priority=1
[Occ-auto]: Repo ID Repo ID of all yum sources on the same machine cannot repeat
YUM Source Tags , native-defined labels are not repeatable in all YUM sources , Warehouse Name
Name: Specify repo name, repo name description to distinguish between different Repo
BaseURL: Specify The address of the Yum source (ftp://, file:// ,/HTTP // )
enabled=1 1 indicates that this yum source is enabled,0 indicates not enabled
gpgcheck=1 1 indicates a digital signature check , 0 does not check .
Gpgkey : Specify RedHat Distribution Digital Signature public key file location.
priority=n (1~99) Specifies the priority of the source , the smaller the number , the higher the priority
This article is from the "Adelphos" blog, make sure to keep this source http://adelphos.blog.51cto.com/2363901/1620531
Configuration of the Yum software warehouse