Product SiteDocumentation Site

A.2. Installing Software with yum

Unlike PackageKit, where the system administrator may choose to allow non-administrative users to install software, yum requires administrator authentication. There are three ways this can be done:
  • You may switch to the root user with the su command:
    [jjmcd@Cimbaoth ~]$ su -
    Password: 
    [root@Cimbaoth ~]# yum install xastir
    Loaded plugins: presto, refresh-packagekit
      ...
    
    This is the least desirable method. You must enter the root password, and you can easily forget that you are operating as root. As the root user you can do unlimited damage.
  • You may use the su command with the -c switch. This allows you to enter the single yum command as root, but immediately switches back to your normal user:
    [jjmcd@Cimbaoth ~]$ su - 'yum install fldigi'
    Password: 
    Loaded plugins: presto, refresh-packagekit
      ...
    
    Notice that you must surround the command with quotation marks or apostrophes. This still requires you to type the password, and is somewhat more annoying to type, but does not leave you as root ready to do damage.
  • If the administrator has set you up in the sudoers file, you may use the sudo command:
    [jjmcd@Cimbaoth ~]$ sudo yum install wxapt
    Loaded plugins: presto, refresh-packagekit
      ...
    
    This has several advantages; you don't need to type the password, you are not left in a dangerous position, and if desired, the administrator can limit you to a select set of commands so you do not inadvertently cause damage.
    Because this is the preferred approach, the examples in this guide use this method. However, it does require setup ahead of time.
yum may determine that additional packages must be installed. yum will list these packages and calculate the total size of the download. It will then ask you whether you want to actually download and install this package or group of packages:
[jjmcd@Cimbaoth ~]$ sudo yum install trustedqsl
Loaded plugins: presto, refresh-packagekit
Setting up and reading Presto delta metadata
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package trustedqsl.i386 0:1.11-3.fc10 set to be updated
--> Processing Dependency: tqsllib >= 1.2 for package: trustedqsl-1.11-3.fc10.i386
--> Processing Dependency: libtqsllib.so.1 for package: trustedqsl-1.11-3.fc10.i386
--> Running transaction check
---> Package tqsllib.i386 0:2.0-5.fc10 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package             Arch          Version               Repository        Size
================================================================================
Installing:
 trustedqsl          i386          1.11-3.fc10           updates          557 k
Installing for dependencies:
 tqsllib             i386          2.0-5.fc10            updates          167 k

Transaction Summary
================================================================================
Install      2 Package(s)         
Update       0 Package(s)         
Remove       0 Package(s)         

Total download size: 723 k
Is this ok [y/N]: 
Answer y or N depending on whether you want to download and install the group of packages.

A.2.1. Searching for Software

yum gives you a number of choices for locating software you desire. To find information about a package you do not need to provide credentials. Any user may look up information about a package. You may search for specific words in the description using yum search:
[jjmcd@Cimbaoth ~]$ yum search APRS
Loaded plugins: presto, refresh-packagekit
Setting up and reading Presto delta metadata
================================ Matched: APRS =================================
aprsd.i386 : Internet gateway and client access to amateur radio APRS packet
           : data
xastir.i386 : Amateur Station Tracking and Reporting system for amateur radio
[jjmcd@Cimbaoth ~]$ 
yum will return the names of any package with the specified phrase in its description, and a short description. You may get a more detailed description of the package with the yum info command:
[jjmcd@Cimbaoth ~]$ yum info xastir
Loaded plugins: presto, refresh-packagekit
Setting up and reading Presto delta metadata
Installed Packages
Name       : xastir
Arch       : i386
Version    : 1.9.4
Release    : 5.fc10
Size       : 4.0 M
Repo       : installed
Summary    : Amateur Station Tracking and Reporting system for amateur radio
URL        : http://www.xastir.org
License    : GPLv2+
Description: Xastir is a graphical application that interfaces HAM radio
           : and internet access to realtime mapping software.
           : 
           : Install XASTIR if you are interested in APRS(tm) and HAM radio
           : software.

[jjmcd@Cimbaoth ~]$ 
Notice that yum also tells you whether the package is installed. Yum also gives you the address of the upstream website so you may learn more about the package before installing it.