Lab L-2 Working with Yum

YUM is a package management system for Linux. It’s used to install packages (programs) from the command line. YUM is used to install RPM packages (*.rpm). YUM stands for Yellow Dog Updater Modified.

 

Yum works by looking in “repositories” which are basically computers that serve a buncha files. They may be mirrored (copies of the entire directory on another computer in the interwebs). The good thing about this is that the program (YUM) can look in other computers if for some reason the repository is down or too busy. There ARE some errors you may get, so read ALL of the directions.

 

A few notes:

/etc/=a directory that holds configuration files and directories

.conf=a configuration file, so yum.conf is the yum configuration file

Su - = logging in as Super User (tada). You have to be logged in as SU in order to change these files.

Most commands are unix commands, but some dos commands work. If all else fails, ask for help!

# = a comment in a configuration file. You can “comment” out a line by putting a # in front of it.

 

Do this

It’ll look like this

  1. Boot into Fedora
  2. First make sure you’re able to get on the Internet since YUM downloads packages from the Internet.
  3. You’re going to Telnet into root.
  4. ApplicationsàSystem ToolsàTerminal
  5. Log into root as a super user:
    1. At the prompt type: su
    2. Type your password you set for root
    3. Your command prompt will change to a #
  6.  First we need to make sure YUM uses our proxy..
    1. You have to specify this in the yum configuration file. So let’s go there.
    2. Cd /etc/ (cd=change directory /etc/ is the directory where all KINDS of stuff is stored….type ls to see)
    3. We want to change the yum.conf file using the text editing program gedit.
    4. Type gedit yum.conf
    5. Scroll down until you find the entry proxy= if there is no entry, add it at the end (after the commands, before all the notes that start with #)
    6. Proxy=http://169.204.171.8:81
    7. Save and close. (If you see an error in terminal related to spelling, ignore it. I think some spelling dictionary isn’t installed.
  7. Let’s update YUM.  Type yum update
  8. Now if you get an error that says something about “cannot find a valid baseurl for repo:” that means that for some reason the repository that the YUM program is trying to look at isn’t working. There are two things you can do.
    1. CD into /etc/yum.repos.d
    2. You will see three configuration files
    3. Gedit fedora.repo and you’ll see some commands commented out. You’re going to remove the # from in front of baseurl lines.
    4. Put # in front of the mirrorlist lines. There should be three in all.
    5. Do the same for the other .repo files
    6. (baseurl is the first place it’ll try to get stuff).
    7. Next gedit fedora-updates.repo
    8. Try again
  9. It will take a LONG time to update all the files. Let her run! Answer the questions.

gedit

yum conf file

 

Yum.conf file

 

 

 

remove comments

  1. You may also have to update the hosts file. Hosts is like a file that acts like a router. You put the IP address of the computer you’re trying to reach into that file and your operating system will start there.
  2. Cd enter to get back to root.
  3. Cd /etc
  4. Gedit hosts
  5. Type in the following:

 

80.239.156.215      mirrors.fedoraproject.org

213.129.242.84     mirrors.rpmfusion.org

 

  1. Save and exit. Note that you can also get to GEDIT from the GUI by going under applicationsàAccessoriesàGedit text editor

hosts

  1. Let’s start by installing another graphical environment called KDE.
  2. The syntax for installing anything in yum is yum install packagename
  3. Type Yum groupinstall @kde-desktop
  4. What this will do is install the KDE environment from the Internet. It will ask you if it’s okay to download it. Say “Y” for yes.
  5. When I installed it there was 110 packages. You can watch it download them one by one. It will take awhile.
  6. The cool thing is, as you watch you may see some errors. YUM will change to a different mirror if one stops working. So don’t stress if you see socket error or http error 403. Yum deals for you.
  7. Once KDE is installed, you can install the program switchdesk to change on the fly. Install switchdesk from yum (yum install switchdesk). After it’sinstalled you can type switchdesk kde to switch.
  8. Logout. At the login screen, put your cursor on the bottom and you can select which environment to log into:

switch

  1. You will also see, if you logout, that down at the bottom you can select either Gnome or KDE before logging on.

 

Note: If there is an error when installing a package, you can simply restart the installation. YUM will determine what parts have already been installed and pick up the other parts from another mirror. When I installed KDE it did not fully install. I just ran the command again, it grabbed the two RPM packets that didn’t download, and I was in business!  If it says it is not installed, rerun the installer. That happened to me EVERY time I installed it.

 

While it’s installing, go to http://www.kde.org/ and take a look at the features of KDE Plasma Desktop.

 

After you log back in it will look very similar, but start poking around under menus and you’ll see…nope, it’s added all sorts of new and exciting things to your desktop and programs!

 

Answer the questions here:

  1. What does KDE stand for?

 

 

  1. What are some free programs available from the KDE community?

 

 

  1. What is the name of the current desktop build?

 

 

  1. Who “owns” KDE?

Yum installing KDE

 

K Desktop Environment works with widgets. It’s cool, too.

  1. Let’s install another fun package called tuxpaint. The command is install tuxpaint…easy peasy! (Easy peasy is NOT part of the command.)
  2. Also go into “Add remove programs” in the GUI and  notice that you’ll know have a listing for KDE Desktop. You can go in and download other programs as well. Pull a few!
  3. Install ONE MORE desktop environment:
    1. Yum install sugar
    2. This gives you three desktops to choose from!

 

One of the benefits of open source is that you can get programs ported to other languages, such as Swahili.

  1. Install one more package you find online. Not sure where to go? Try http://dailypackage.fedorabook.com and either install today’s package, or Google a specific type of program and find out what the RPM for it is.

 

 

Questions

  1. What is YUM?

 

 

  1. What is an RPM?

 

 

 

  1. What is the hosts file?

 

 

  1. What is a .conf file?

 

 

 

  1. What is a baseurl?

 

 

 

  1. What is a .repo file?

 

 

 

  1. What is the command if you wanted to install a program named Tory_Rocks?

 

 

  1. How do you switch between KDE and GNOME?

 

 

  1. What is GNOME?

 

 

  1. What is KDE?

 

 

  1. What are three differences you see between those two desktop environments?

 

 

 

  1. If you’re installing something via YUM and one of the download mirrors goes down, what do you do?