Nov 18, 2011

Fedora Repository

This is a very basic knowledge all Fedora users must know. Repository is libraries of application packages you need to work and using Fedora optimally. There is 2 ways in add repository. Online and Offline. This is the explanations.


Online Repository

There is many repositories you can add as your repository. But an external repository that been exist for long time as online repository is RPM Fusion. This repository has many package which standard repositories from Fedora has not. This is a simple step to install RPM Fusion repository :

Click RPM Fusion free for Fedora X, Y, and Z to download.
Click RPM Fusion nonfree for Fedora X, Y, and Z to download.
The downloaded RPM usually saved to Downloads directory in Home.
Type it on Terminal (as root) :

$ su root
Password : <-- insert your root password
# rpm -ivh Downloads/rpmfusion-free-release-stable.noarch.rpm
# rpm -ivh Downloads/rpmfusion-nonfree-release-stable.noarch.rpm

Or you can try direct ways to install it (without open RPM Fusion website). But, this way will no longer usable if RPM Fusion change the link to download repository package. Try this :


$ su root
Password : <-- insert your root password
# rpm -ivh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm
# rpm -ivh http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm

And now RPM Fusion repository is installed on your Fedora. Try search some application to ensure that RPM Fusion is active as one of default repository.

Offline Repository

This offline repository use DVD installer of Fedora, make it to be your repository in offline mode. This way is useful if your computer can't connected to internet or you have low bandwidth connection so you aren't comfort to download package from internet. Note that DVD installer Fedora hasn't all package that you need. It just has standard package of application which have bundled to Fedora installer. This is step by step to make your Fedora DVD installer as offline repository. We assume that you use DVD installer of Fedora 16 Verne with 1386 arch and you use DVD directly to your ODD. First, make a file named local.repo (or whatever.repo as you like) in your home directory. Content of it is :

[local]
name=whatever
baseurl=file:///media/Fedora%2016%20i386%20DVD/
enabled=1
gpgcheck=0

If you want to enable GPG Key checking, the content is like this :

[local]
name=whatever
baseurl=file:///media/Fedora%2016%20i386%20DVD/
enabled=1
gpgcheck=1
gpgkey=file:///media/Fedora%2016%20i386%20DVD/RPM-GPG-KEY-fedora-$basearch

Then, type this command (as root) :

$ su root
Password : <-- insert your root password
#cp local.repo /etc/yum.repos.d/

Now, we assume that you have the iso of Fedora DVD installer saved in your home directory. In this case, you must mount the iso file at first in directory. We assume this iso will mounted in /mnt/repo/. Type this command in terminal (as root) :


$ su root
Password : <-- insert your root password
# mount -r -t iso9660 -o loop /home/your-name/Fedora-16-i386-DVD.iso /mnt/repo

Make a file named local.repo (or whatever.repo as you like) in your home directory. The content is :


[local]
name=whatever
baseurl=file:///mnt/repo/
enabled=1
gpgcheck=0

If you want to enable GPG Key checking, the content is like this :

[local]
name=whatever
baseurl=file:///mnt/repo/
enabled=1
gpgcheck=1
gpgkey=file:///mnt/repo/RPM-GPG-KEY-fedora-$basearch

Then, type this command (as root) :


$ su root
Password : <-- insert your root password
#cp local.repo /etc/yum.repos.d/

Now, you just need to use this. Try this command (this command will install development tools from DVD installer) as root :


$ su root
Password : <-- insert your root password
# yum --disablerepo=* --enablerepo=local groupinstall "Development Tools"

NOTE : "su root" is only declared once at first. In this article, it's exist in every command. The purpose is just for remembering you to work as root until your repository installed and ready to use. If you have root access, you can ignoring the "su root" command.

2 comments: