Configuring yum

Basic Commands

* Install an application

$ sudo yum install application_name

* Remove an application

$ sudo yum remove application_name

* Install an rpm from your hard disk using yum to resolve dependencies

$ sudo yum localinstall application_name

* Search for an application

$ sudo yum search application_name

* Find info about an application

$ sudo yum info application_name

* Update the whole system

$ sudo yum update

* Enable a repository

$ sudo yum –enablerepo=repo_name

* Disable a repository

$ sudo yum –disablerepo=repo_name
Fedora Repositories
Fedora has 2 repositories named ‘fedora’ and ‘updates’. To use them and not get errors about unsigned packages you must import their GPG keys. Open a terminal and type:

$ sudo rpm –import /etc/pki/rpm-gpg/*
Livna Repository
In Livna repository you can find additional programs and multimedia codecs. Install it like this:

$ sudo rpm -hiv http://rpm.livna.org/livna-release-8.rpm
$ sudo rpm –import http://rpm.livna.org/RPM-LIVNA-GPG-KEY
FreshRPMS Repository
Install it like this:

$ sudo rpm -hiv http://ftp.freshrpms.net/pub/freshrpms/fedora/linux/8/freshrpms-release/freshrpms-release-1.1-1.fc.noarch.rpm
$ sudo rpm –import http://freshrpms.net/RPM-GPG-KEY-freshrpms
ATrpms Repository
This repository is said to provide better mythtv support among others. I can’t say for sure since I don’t have a card to test it. To install it type:

$ sudo rpm –import http://atrpms.net/RPM-GPG-KEY.atrpms
$ sudo nano /etc/yum.repos.d/atrpms.repo And paste those lines in the file atrpms.repo
[atrpms]
name=Fedora Core $releasever – $basearch – ATrpms
baseurl=http://dl.atrpms.net/f$releasever-$basearch/atrpms/stable
gpgkey=http://ATrpms.net/RPM-GPG-KEY.atrpms
gpgcheck=1
enabled=0** Note: From now on you should better use only one of Livna, FreshRPMs and ATrpms repositories for installing additional packages. Mixing repositories may cause your system to become unstable or even crash it! I prefer the Livna repository and I will use this for the rest of the guide. Therefore my default settings will be Livna repository enabled and freshrpms/atrpms repositories disabled. You can disable the ones you don’t want like that:

$ sudo nano /etc/yum.repos.d/livna.repo
$ sudo nano /etc/yum.repos.d/freshrpms.repo
$ sudo nano /etc/yum.repos.d/atpms.repo and change “enabled=1” to “enabled=0”. Save (Ctrl+O) and exit (Ctrl+X).
Graphical Interface ( yumex )
If you are not familiar with console you can use yumex. Yumex is a GUI (Graphical user Interface) for yum to simplify all the above commands. To install it type:

$ sudo yum install yumex
** Note: For the rest of the guide I’ll be using yum for installing additional packages. If you prefer it you can enable/disable repos and install packages through yumex.
yum through proxy
If you are behind an http proxy server and you want yum to connect to the internet through that proxy open a terminal and type:

$ sudo nano /etc/yum.conf
Add this line in the yum configuration

proxy=http://ip:port/
where ip is your proxy’s ip address and port is the port the proxy listens to. Don’t forget the / after the port number. Save (Ctrl+O) and exit (Ctrl+X).
yum plugins

* presto

Presto is a project that provides faster, smaller size downloads to Fedora users. With presto plugin enabled you use deltarpm repositories to download only the part of the rpm that has change, thus saving you bandwidth and time. To enable it open a terminal and type:

$ sudo yum install yum-presto deltarpm
Next we have to make some changes to the .repo file to support downloading from deltarpm repositories.

$ sudo nano /etc/yum.repos.d/fedora-updates.repo
and change it from

[updates]
name=Fedora $releasever – $basearch – Updates
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/updates/$releasever/$basearch/
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f$releasever&arch=$basearch
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedorato
[updates]
name=Fedora $releasever – $basearch – Updates
baseurl=http://lesloueizeh.com/f8/i386/updates
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/updates/$releasever/$basearch/
#mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f$releasever&arch=$basearch
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
or to
[updates]
name=Fedora $releasever – $basearch – Updates
baseurl=http://dl.anmar.eu.org/repos/f8/updates-x86_64
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/updates/$releasever/$basearch/
#mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f$releasever&arch=$basearch
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
depending on your Fedora version.

Save (Ctrl+O) and exit (Ctrl+X). Now each time you try a yum update you should see a ‘Loading “presto” plugin’ mesage.

Advertisements

About Tanveer
RIA (Rich Internet Application) Developer with a wide variety of business applications. Particularly interested in client/server and relational database design. Always interested in migration projects, as well as close interaction with the DB manufacturers.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: