Yum repo file in Linux

  
The repo file is the configuration file of the yum source (software repository) in Fedora. Usually a repo file defines the details of one or more software repositories. For example, where will we download the packages that need to be installed or upgraded, and the settings in the repo file? The content will be read and applied by yum! We use a system's own repo file as an example to explore (# is followed by my comment): [fedora] # inside the square bracket is the name of the software source, will be obtained and recognized by yum name=Fedora $ Releasever -$basearch #This also defines the name of the depot, usually for the convenience of reading the configuration file, generally does not work, the $releasever variable defines the release version, usually 8, 9, 10 and so on, the $basearch variable defines the system The architecture can be i386, x86_64, ppc, etc. These two variables have different values ​​according to the current system version architecture. This can facilitate the yum upgrade when selecting the package suitable for the current system, the same as … … failovermethod=priority #failovermethod has two values ​​to choose from, priority is the default value, which means that the mirror server address is selected in order from the listed baseurl, and roundrobin means randomly select exclude=compiz* *compiz* fusion in the listed servers. -icon* #excludeThis option was added later by myself to disable some soft in this repository. Package installation and updates, can use wildcards, separated by spaces, can be added as needed #baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/$basearch/Os /# above a line baseurl first character is '#' indicates that the line has been annotated, will not be read, this line means to specify a baseurl (source mirror server address) #mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch #The above line specifies the address list of a mirror server, usually open, in this case the comment symbol is disabled, we Try it, replace $releasever and $basearch with your own version and architecture, such as 10 and i386. Open in the browser and we'll see a long list of mirror server address lists available. Selecting the mirror server address that is faster to access and copying it into the repo file, we can get a faster update speed, as shown in the 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 defined in this repo is enabled, 0 is disabled gpgcheck=1 #this option Indicates that the rpm downloaded in this repo will be gpg verified. It has been determined that the source of the rpm package is valid and secure. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch #definition gpg key for verification ## following software depot Basically, the option has the same meaning 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
Copyright © Windows knowledge All Rights Reserved