How-to : Repositories setup

repo

Introduction

This posts will give you some help in repository setup process. It covers web-based repo setup (such as rpmfusion), dvd-based repo, and home-made repo (this last guide needs to be done).

 

 

Note : After any of the following process, you will first need to clean the yum cache, and then re-build it using those commands:

yum clean all && yum make cache

 

1 Dvd repo

Here is how to setup a repo using a (mounted!) dvd.

  1. Create the repo file
    vi /etc/yum.repos.d/dvd.repo
  2. Add content

    [dvd]mediaid=xxxxxxxxxx.xxxxxx
    name=DVD for RHEL6
    baseurl=file:///media/RHEL_xxxxxxxxxxxDVD/Server
    enabled=1 gpgcheck=0

    Note : The mediaid value comes from the .discinfo file located in the root of the DVD.

 

2 Web repo

This chapter lists some of the repo i use and the one-liners used to set it up quickly.

2.1 RHel6

  • epel repo
    rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-5.noarch.rpm
  • rpmfusion repo
    rpm -Uvh http://download1.rpmfusion.org/free/el/updates/testing/6/i386/rpmfusion-free-release-6-0.1.noarch.rpm
  • remi repo
    rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
  • Virtual Box repository for RHel6, you either use the follwoing one-liner or create the repo-file as shown after the one-liner
    • One-liner
      wget http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo
    • Manually create the repo-file virtualBox.repo (to be created in /etc/yum.repos.d/)
      echo '[virtualbox]
      name=Oracle Linux / RHEL / CentOS-$releasever / $basearch - VirtualBox
      baseurl=http://download.virtualbox.org/virtualbox/rpm/el/$releasever/$basearch
      enabled=1
      gpgcheck=1
      gpgkey=http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc
      ' > /etc/yum.repos.d/virtualBox.repo

 

 

2.2 Fedora 15

  • epel repo
    rpm -Uvh http://download.fedora.redhat.com/pub/epel/beta/6/i386/epel-release-6-5.noarch.rpm
  • rpmfusion repo
    yum localinstall --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm
  • remi repo
    rpm -Uvh http://rpms.famillecollet.com/remi-release-15.rpm

 

2.3 Oracle VirtualBox repo

  • Create and populate the repo file
    echo '[virtualbox]
    name=Fedora $releasever - $basearch - VirtualBox
    baseurl=http://download.virtualbox.org/virtualbox/rpm/fedora/$releasever/$basearch
    enabled=1
    gpgcheck=1
    gpgkey=http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc' > /etc/yum.repos.d/virtualbox.repo
  • Build yum cache

    yum makecache

You’re done!

 

3 Local repo

To be completed!

Tagged on: ,

Leave a Reply

Your email address will not be published. Required fields are marked *

This site supports SyntaxHighlighter via WP SyntaxHighlighter. It can highlight your code.
How to highlight your code: Paste your code in the comment form, select it and then click the language link button below. This will wrap your code in a <pre> tag and format it when submitted.