Yum: Search and Install

Written by Benjamin Cane on 2011-08-03

Yum is one of the easiest methods of installing packages on Red Hat and its variants. Here is a quick example of how to search and install a package.

We will be installing irssi today.

To search a package you simply use the search command.

[[email protected] ~]# yum search irssi  
Matched: irssi   
irssi-devel.i686 : Development package for irssi  
irssi-otr.i686 : Off-The-Record messaging plugin for irssi  
irssi-xmpp.i686 : XMPP plugin into irssi  
irssi.i686 : Modular text mode IRC client with Perl scripting  
ctrlproxy.i686 : ctrlproxy  
dvtm.i686 : Tiling window management for the console  
ekg.i686 : A client compatible with Gadu-Gadu  
purple-plugin_pack-pidgin.i686 : A set of plugins for pidgin  
xchat-otr.i686 : Off-The-Record messaging plugin for xchat

After you found the package you want install it.

[[email protected] ~]# yum install irssi
Loaded plugins: langpacks, presto, refresh-packagekit  
Adding en_US to language list  
Setting up Install Process  
Resolving Dependencies  
--> Running transaction check  
---> Package irssi.i686 0:0.8.15-3.fc14 set to be installed  
--> Finished Dependency Resolution  

Dependencies Resolved  

Installing:  
irssi i686 0.8.15-3.fc14 fedora 779 k  

Transaction Summary  
Install 1 Package(s)  

Total download size: 779 k  
Installed size: 2.3 M  
Is this ok [y/N]: y  
Downloading Packages:  
Setting up and reading Presto delta metadata  
Processing delta metadata  
Running rpm_check_debug  
Running Transaction Test  
Transaction Test Succeeded  
Running Transaction  
Installed:  
Complete!

One of the best features of Yum is that it will resolve dependency issues for you and install additional packages, but only after asking nicely.


Picture of Benjamin Cane

Benjamin's specialty is keeping the lights on for mission critical systems. He is currently building applications that enable high concurrency financial transactions.

Recently Benjamin published his first book; Red Hat Enterprise Linux Troubleshooting Guide. In addition to writing, he has several Open Source projects focused on making Ops easier. These projects include Automatron, a project enabling auto-healing infrastructure for the masses.


Publications

Identify, capture and resolve common issues faced by Red Hat Enterprise Linux administrators using best practices and advanced troubleshooting techniques

What people are saying:
Excellent, excellent resource for practical guidance on how to troubleshoot a wide variety of problems on Red Hat Linux. I particularly enjoyed how the author made sure to provide solid background and practical examples. I have a lot of experience on Red Hat but still came away with some great practical tools to add to my toolkit. - Amazon Review