17/01/2015

[Yum] Add and manage custom repositories

In the latest Fedora versions, it is possible to add custom repositories to yum by creating a .repo file under the /etc/yum.repos.d/ folder following this structure:

[REPOSITORY_NAME]
baseurl=REPOSITORY_URL
enabled=1
gpgcheck=1
gpgkey=URL_TO_KEY

This will add and enable the repo available at REPOSITORY_URL signed by the GPG key found at URL_TO_KEY to your list.

Here's a couple of offical Fedora repos for Google Chrome and VirtualBox:



[google-chrome]
name=google-chrome - \$basearch
baseurl=http://dl.google.com/linux/chrome/rpm/stable/\$basearch
enabled=1
gpgcheck=1
gpgkey=https://dl-ssl.google.com/linux/linux_signing_key.pub

[virtualbox]
name=Fedora $releasever - $basearch - VirtualBox
baseurl=http://download.virtualbox.org/virtualbox/rpm/fedora/$releasever/$basearch
enabled=1
gpgcheck=1
gpgkey=https://www.virtualbox.org/download/oracle_vbox.asc

Note that the VirtualBox repo definition is available at http://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo


No comments:

Post a Comment

With great power comes great responsibility