Skip to Content

Revision of YUM from Mon, 14/06/2004 - 3:35am

The revisions let you track differences between multiple versions of a post.

CVirus's picture

No Doubt that Every Single "Yellow-Dog" and "Fedora Core" User knows this Awesome Tool named YUM ... In this Article we will know what is YUM and how to use it and what are the Advantages and Disadvantages that Exist in YUM ... We will also talk a little bit about the "yum.conf" File ... And Finally we will get to know some useful Links Related to YUM ... Here We Go ! ... :)

First : What is YUM ?

YUM is an Interactive, Automated Update Program which can be used for Maintaining Systems using rpm ... By Other Means; You can use YUM to Install New rpm Packages or Update Exisiting Packages. The word YUM stands for "Yellowdog Updater Modified".

Second : The "yum.conf" File :

Third : How Can I use YUM ???

Note : Before you Start getting Packages From any Repository using YUM ... You Need To Download the Header Files { YUM does this Automaticly} ... Every rpm has a Header, That Header contains a complete file list, Package Descriptions, lists of what features it provides, lists of what it requires, what it Conflicts with ... In order for rpm to make a decision about what it will need to be installed, it needs the information in the header ... What Yum does is to copy the header from the Repository, then the client part of yum uses those Headers to determine what needs to be Installed/Upgraded/Erased.

Forth : What are the Advantages and Disadvantages of YUM ???

Advantages : YUM is Relatively Pretty and Relatively Nice and has Significantly less legacy Baggage than "apt" {Software Similar To YUM} ... Size of codebase in apt (find -name \*.cc | xargs wc -l): 40141 and the Size of codebase in YUM (find -name \*.py | xargs wc -l): 4681 .

Disadvantages : hmmm ... Really didn't see any Disadvantages ... Then the answer is NONE !

Finally : Some Links Related To YUM

Nuthin's Left ... CYA Later

CVirusNo Doubt that Every Single "Yellow-Dog" and "Fedora Core" User knows this Awesome Tool named YUM ... In this Article we will know what is YUM and how to use it and what are the Advantages and Disadvantages that Exist in YUM ... We will also talk a little bit about the "yum.conf" File ... And Finally we will get to know some useful Links Related to YUM ... Here We Go ! ... :)

First : What is YUM ?

YUM is an Interactive, Automated Update Program which can be used for Maintaining Systems using rpm ... By Other Means; You can use YUM to Install New rpm Packages or Update Exisiting Packages. The word YUM stands for "Yellowdog Updater Modified".

Second : The "yum.conf" File :

Third : How Can I use YUM ???

Note : Before you Start getting Packages From any Repository using YUM ... You Need To Download the Header Files { YUM does this Automaticly} ... Every rpm has a Header, That Header contains a complete file list, Package Descriptions, lists of what features it provides, lists of what it requires, what it Conflicts with ... In order for rpm to make a decision about what it will need to be installed, it needs the information in the header ... What Yum does is to copy the header from the Repository, then the client part of yum uses those Headers to determine what needs to be Installed/Upgraded/Erased.

Forth : What are the Advantages and Disadvantages of YUM ???

Advantages : YUM is Relatively Pretty and Relatively Nice and has Significantly less legacy Baggage than "apt" {Software Similar To YUM} ... Size of codebase in apt (find -name \*.cc | xargs wc -l): 40141 and the Size of codebase in YUM (find -name \*.py | xargs wc -l): 4681 .

Disadvantages : hmmm ... Really didn't see any Disadvantages ... Then the answer is NONE !

Finally : Some Links Related To YUM

Nuthin's Left ... CYA Later

CVirus

Comments

whirlpool's picture

Very neat article

I really would like to thank you CVirus for this article. If this LUG came out with articles and reviews in this form we will be very beneficial to a scale we might never had thought about before.

CVirus's picture

thanks

Thank u whirpool for reading my article :) ... I just wanted to know what are my Prons and Cons ... So I can make future articles much more better ... thank u once again :)

YoussefAssad's picture

Yeah, great stuff

Well written, cvirus. Good work.

(although yum is clearly an apt ripoff :-p )

--

Login's picture

Very Great work

it is a very good work CVirus. thank u for ur great effort

mildewy's picture

nice

thnx Cvirus for that article......,it's so nice really and try to do more :-)

Very Nice

just wanted to congratulate you for the great work you have done. keep it up and lets see more great and well explained articles like these :)

¦«àlGhôôl.lôôhGl໦

Hi. My name is Mike and

Hi.

My name is Mike and I use Fedora Core 2 as my main OS at home and for work, I also use RH9 at work, along with FreeBSD. When updating or installing software on the RH9 and FreeBSD, I do it remotely, for the most part all the software I need is on the default install of the distro I'm using, but occasionally (especially for my home PC) I need to install some applications not included on the Distro CDs. For example mp3 support for FC2.

For you apt or apt-get users, yum is just as powerful as apt. I like it because its included with the RH and FC Distros and there is no need to download another application to do the same thing. I will say this the only thing that I have found out apt has and yum doesn't is a GUI. I will address that at the end.

Now the only option/switch I use every time I use yum is -y. -y will tell yum to say yes to all questions.

First off yum use a file (/etc/yum.conf) to keep track of repositories to search for applications. The default yum.conf has only 2 or 3 repositories for updating its distro. For Example FC2 has these default entries:

Code: name=Fedora Linux $releasever - $basearch - core baseurl=ayo.freshrpms.net/fedora/linux/$releasever/$basearch/core name=Fedora Linux $releasever - $basearch - updates baseurl=ayo.freshrpms.net/fedora/linux/$releasever/$basearch/updates name=Fedora Linux $releasever - $basearch - freshrpms baseurl=ayo.freshrpms.net/fedora/linux/$releasever/$basearch/freshrpms

  1. name=Fedora Linux $releasever - $basearch - testing updates
  2. baseurl=ayo.freshrpms.net/fedora/linux/$releasever/$basearch/tupdates

I add these entries to those: Code: name=Livna.org Fedora Compatible Packages (stable) baseurl=rpm.livna.org/fedora/$releasever/$basearch/yum/stable gpgcheck=1

name=Fedora US $releasever - $basearch - Latest Packages baseurl=download.fedora.us/fedora/fedora/2/i386/SRPMS.os/

name=Fedora Core 2 NewRPMS.sunsite.dk baseurl=newrpms.sunsite.dk/apt/redhat/en/i386/fc2

name=Dag RPM Repository for Fedora Core 2 baseurl=apt.sw.be/fedora/$releasever/en/$basearch/dag

name=Extra Fedora rpms dries - $releasever - $basearch baseurl=dries.studentenweb.org/yum/fedora/linux/$releasever/$basearch/dries Those extra repositories act as a backup to my default ones if those servers aren't available and also contain applications not available with the distro. Also they will have an entry for your distro (if applicable) to add to your yum.conf listed on their sites.

Once those are added to your yum.conf you can now update the headers for your distro by entering: Code: yum -y check-update That will only download headers for new updates or software available. If you haven't ran yum check-update yet it will take a bit depending on the amount of headers needed to download.

This command will not only update the headers but also download and install any updates available:

Code: yum -y update You can also specify a specific package to update by typing:

Code: after updating the one command (besides installing a package) i continuously us is: Code: yum -y list That will display a list of packages available for install. I usually redirect the output using the (>) redirection operator. Code: yum -y list > packageslist If I want to see whats installed on my system, this is the command I use. Code: yum -y list installed To install a new package I first use the list option to see whats available and then type: Code: Working example: yum -y install mplayer will download and install mplayer. Whats nice about yum and apt is that they will resolve dependencies. If you don't have a dependency and its available in your list of repositories yum will download it and install it for you automatically. If its not available then you will have to search for it and install it manually first then continue with yum. If you now a packages name and want to know if its available with out searching through the list? Code: This will search your repositories for a matching package. Code: yum -y info package name This will provide you with a full detail and summary on a package. To remove or uninstall a package: Code: yum -y remove ,package name> OK yum will download the packages but will not delete them after install/upgrade and will not delete old headers. Simply type Code: yum -y clean I hope this heps some of you when installing /updating your software. There are a few more options that yum provides (for the most part variations of ones stated here.) by typing: Code: man yum That will give you the man page on yum with more options. now IU haven't had a problem installing anything or updating except when a dependency hasn't been packaged yet. For example to update to php 4.3.6.5 I need to remove some php-* because they aren't available yet and require 4.3.4.5 Example php-mmcache needs 4.3.4.5 and not compatible with 4.3.6.5 So I'll wait. Now one last little thing if you want to install more than package using yum -y install. You CAN. This will download and install mplayer, boson, and cssed in one shot: Code: yum -y install mplayer boson cssed I have a small bash script for yum and rpm (RPM queries are used to supplement yums). yummenu contains all the commands I have included here and some more. It will download and install yum and RPM from sources if you can't have them available and has the yum.conf I use for FC2 and RH9 _

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.


Dr. Radut | book