Linux Migration for the Home PC User, Part 6

By Ed Hurst | Posted at 5:19 AM

Let's add another repo. A repository, or repo, is a place where additional software packages are available for download. Out of the box, most Linux distributions are preconfigured with standard repos for downloading additional features, as well as receiving updates to the system.

Previously in this Series
Part 1
Part 2
Part 3
Part 4
Part 5

I'm going to choose for you the one I have found most likely to offer what you want or need, with the least amount of difficulty, particularly in matching the packages to the basic system. That repo is called RPMForge. This is relatively easy, if you happen to be reading this from your computer which is running CentOS, of course. That's because you can easily copy the instructions below and execute them without any typing at all, aside from logging into the Terminal as root. Do that login now.

When you have that done, tell the prompt to move to root's home directory:

cd

If you issue that command without telling the prompt where to go, it always goes “home” for the account you are using. You may be familiar with using your mouse in Windows to highlight and copy text:

  • click the mouse button and hold it down
  • drag across the text you want to copy
  • let go of the left mouse button, and right click (or use the application menus, or hit CTRL + C)
  • select from the popup menu “copy”
  • using any of the above methods to paste

We call this “using the clipboard.” That works the same in Linux. However, Linux has one extra trick: You don't have to use keystrokes or the right-click menu in every case. Sometimes, you can just drag the mouse across the text, let go, and it's already in a clipboard which belongs to the mouse itself, and can be pasted by the mouse. If you have anything which acts as a middle button, just put the mouse where you want to paste and push that middle button. It pastes immediately. If you have only two buttons, chances are you can carefully push both buttons at the same time, and it should work the same. However you do it, copy the text below and paste it into your Terminal window at the prompt:

wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm

Hit ENTER. This tells the little program “Wget” to fetch something from the server where RPMForge keeps their stuff. The prompt should respond with contacting the server and downloading a package, using equal signs as a double line and an arrow head (>) moving across the screen showing progress. When you have it, the prompt should come back. Cut and paste this command:

rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt

We are telling the RPM (Red Hat Package Manager) to install a security mechanism for the packages which come with RPMForge. You need it to keep RPM from arguing or making warnings about stuff later. It is designed to prevent folks easily creating fake packages with nasty surprises and getting you to install them. Now copy and paste this command:

rpm -ivh rpmforge-release-0.3.6-1.el5.rf.*.rpm

Hit ENTER. This tells RPM to install that package we just downloaded. It should indicate it's preparing, then show a little progress bar (using hash marks #) and come back when it's done. We are almost ready to use the RPMForge repo, but we need to make one edit to a configuration file to make sure your system gives proper priority for it.

Let's go back to /etc again. Remember? Only, this time we already know the specific folder inside there we need to visit, so the command looks like this:

cd /etc/yum.repos.d

Now type the ls command. When we installed the package file we downloaded above, it added some stuff, to include a couple of files here. You should see at least these two files, one you'll recognize:

CentOS-Base.repo   rpmforge.repo

Any other files don't concern us right now. You should recall editing the CentOS-Base.repo and we are going to do the same for rpmforge.repo, using Nano:

nano rpmforge.repo

There should be only one entry here for [rpmforge]. Move your cursor down below the last line, and add this:

priority=3

If you've been paying attention, you might have figured out we want RPMForge to be the number 3 priority, behind the other priorities in the other file. This should work just fine for our purpose.

Now, save (CTRL + O) and exit (CTRL + X). At the prompt, let's check to see if Yum can understand what we've done.

yum update

You should see the computer checking the new repo, adding some information, and it may even offer to update something. Answer “Yes” by hitting the Y key. Watch it do it's thing, and get familiar with what it looks like. Next, we add some interesting software.

Rather than bore you with all the details of why you need this or that, I'm going to give you the whole shebang in a couple of short steps. We are assuming here you want your web browser to do the normal stuff with Flash videos, music files and so forth. While it may not always work, this should get you as close as possible. This also assumes you have a DVD player connected to your computer.

Just cut and paste the long line of command for Yum you see here:

yum install libdvdcss libdvdread libdvdplay libdvdnav lsdvd mplayerplug-in mplayer compat-libstdc++-33 flash-plugin gstreamer-plugins-bad gstreamer-plugins-ugly

There should be some surprises here, but it will help you understand how it all works. By asking Yum to add all those packages, it will have to check for some other stuff needed to make all those work, what we call “dependencies.” This may take some time, and you may have a tough time following it all. Aside from unexpected hiccups in your system or the system where these packages are pulled, you should still get a chance to say “Yes” or “No” — type Y, of course.

We are almost there. Now we have to add something called “codecs” so that software we just downloaded knows how to recognize all kinds of media files. The dirty details have to do with licensing agreements, companies which refuse to do business with Linux, and international agreements on copyrights, etc. If there's a way around it all, Linux people will find a way. Don't get too worried about it; none of the several million Linux users in the world have been hassled by anyone as far as we know.

This time, we tell RPM to do the work for us. It can install files from someplace else across the Net, so cut and paste these commands:

rpm -Uhv http://www1.mplayerhq.hu/MPlayer/releases/codecs/mplayer-codecs-20061022-1.i386.rpm

You may get a warning about a “signature” but we can't do much about that. Then:

rpm -Uhv http://www1.mplayerhq.hu/MPlayer/releases/codecs/mplayer-codecs-extra-20061022-1.i386.rpm

That should take care of everything. Those last two commands grabbed some packages from a Linux specialty website in Hungary, and installed them on your system, which makes it possible to play the same multimedia files most other people can see or hear in Windows.

For now, log out of the root account and close the Terminal window. You'll need to restart your web browser for the plugins to work. The hardest part is already done, and what follows from here is generally much easier. Did you enjoy playing with the command line?

Ed Hurst is Associate Editor of Open for Business.