Skip to main content
Welcome guest. | Register | Login | Post

A Quick Guide to YUM

7 replies [Last post]
AndrewB's picture
Offline
Joined: 2005-12-18

Just a small tutorial on using Yum.

Firstly, YUM stands for 'Yellowdog Updater Modified'
YellowDog Linux is a distribution of Linux crated for the ppc architecture and is rpm based. Fedora Core took up this package manger as of Fedora Core 1.
It may take its fame from this, as x86 and the Fedora project is much more known and heard of than PPC and YellowDog.
While many people prefer debian based apt-get, it is still a powerful tool.

As said above, it uses RPM packages as its fuel. These I have found are very useful, and are faster than installing from source. But they are not as optimized as source.

Anyway.
The first command you should learn is
man yum
I'm not about to finish the tutorial at that, so please don't turn away.
While my tutorial aims to help general usage, the man page provides you with a massive page of its functionality.

2, How to Install.

Yum is useful in a way that it calculates a programs dependencies and gets them and installs them for you. Given they are found in a repository.
For a default install of one application you can do;
yum install gaim
Where gaim is the program.
This will get all the dependencies, then prompt you with the list and how much it needs to download, you can accept or decline.

The next logical thing to tell you is that you can stack them up
so you can;
yum install gaim xchat firefox
This will do above but get the deps. for each one, then prompt you.

Now the prompt is getting annoying eh? Especially if you wanna just let it run and leave it. this is where the -y flag kicks in!
so the above command turns into
yum -y install gaim xchat firefox
Now it does not prompt you, it runs it course. Woo!

3. Searching for a package.

Sometimes yum can be strange, in the way that it can not find the package you have searched for, or it has multiple options for it. So them great guys allowed us to search the repo's with a simple command;
yum search gaim
This will then display a lots of what it can find for gaim. I believe it searches the description field..as well as the title. If you have got a temper-mental memory and can't remember the spelling of an application you can use the * wild card, so then you could;
yum search gai*
Could be useful for longer applications names...

Sometimes you can have more than one application version per application, thus you can use the simplified;yum list gaim
this should provide a list of the application versions. So if you need a specific one, or need the functionality of an older packages.

4. remove a package

Yum can not only install but it can also remove an app.
in the form of this command;yum remove gaim
This will remove the application and any things specific to it, that wont function with out, for example gaim-remote.

5. Updating a package.

Now, life is hard to go and install then remove a package then install once again, just to get the latest version.
So why not introduce an update command.......and bada-bing.
yum update gaim
Will go and grab the latest Gaim, and install it for you. Simple eh!

As you can see from now, Yum makes life a hell of a lot easier, and does everything for you.

To upgrade everything that is possible use yum update
And go get a coffee....

6. Repo's

Ok enough of these damn commands eh!
What is this 'repo' that I have talked about?

Repo is short for repository, which is an Internet page, or ftp share of packages. This is the place that Yum grabs all the rpm sources from.

You can add a repository to your yum configuration by a file to /etc/yum.repo's.d/ Here is an example of the file you will need to create.

As I have said above, this is but a small tutorial on the basics, more information can be found;
man yum
Yum Home Page
Tutorial on how to make Yum Leet.
Fedora's Yum Page
Wikipedia Big Desctiption

DIGG IT!

libervisco's picture
Offline
Joined: 2006-05-04

Nice tutorial for quick reference. I'm sure it can be useful for newbies just looking to get a quick start on things with yum and then they can dig further through the links you provided. Smiling

a thing's picture
Offline
Joined: 2005-12-20

Two things to add:
1. Use the -y option to answer yes to everything.
2. There's a yum service that runs a yum update nightly for you. Use system-config-services and scroll all the way to the bottom to control it, or manually enable it (which I'm sure is covered elsewhere.)

AndrewB's picture
Offline
Joined: 2005-12-18
"a thing" wrote:

Two things to add:

2. There's a yum service that runs a yum update nightly for you. Use system-config-services and scroll all the way to the bottom to control it, or manually enable it (which I'm sure is covered elsewhere.)

Yah /etc/init.d/yum start Will do the trick too Eye
Though you will have to add it to your init levels.

a thing's picture
Offline
Joined: 2005-12-20

instetad of typing out /etc/init.d/, service works.

libervisco's picture
Offline
Joined: 2006-05-04
"a thing" wrote:

Two things to add:
1. Use the -y option to answer yes to everything.

He wrote that already:

"AndrewB" wrote:

Now the prompt is getting annoying eh? Especially if you wanna just let it run and leave it. this is where the -y flag kicks in!
so the above command turns into

 yum -y install gaim xchat firefox

Now it does not prompt you, it runs it course. Woo!

Offline
Joined: 2006-01-02

Whoa, great guide! I'll surely install YUM the next time I get on slackware..
Is it slackware-compatible?

a thing's picture
Offline
Joined: 2005-12-20

No, Yum is for RPM.

Comment viewing options