Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Linux Timesaving Techniques For Dummies.pdf
Скачиваний:
59
Добавлен:
15.03.2015
Размер:
15.98 Mб
Скачать

17 Installing Made

Easy with RPM

Technique

Save Time By

Using RPM at the command line for speedy installations

Using RPM at the command line to remove unwanted programs

Using RPM with a graphical interface for a friendly installation

Installing from media (CD or DVD)

Throughout the book, we tell you to see Technique 17 for help installing RPM packages (that is, software packages installed with the rpm command). Here’s where we share how this handy trick is done.

This is a good technique to bookmark because you’ll be using it a lot.

RPM (the Red Hat Package Manager) works great at the command line or with a graphical interface. The command line gives you raw speed and power, but it’s not as friendly as a browser-based interface. Fortunately, you get to choose the method that you prefer.

RPM also makes quick work of uninstalling programs — no more lost disk space or time wasted trying to chase down all the program files. With one command, you can erase programs that are no longer used or don’t live up to their initial promises.

In this technique, we show you how to use RPM to install new software at lightning speeds. Other package managers are available, but RPM is the standard method for installing software on Linux systems. We don’t want to give you the impression that RPM is the only way to install, but for speed and simplicity, RPM is a good choice.

Dissecting an RPM Package

An RPM package is a collection of files and (usually) a few scripts that run whenever you install or remove the package. You can peek inside an RPM package with the command rpm -qpl package-name (we show you some other handy RPM queries in Technique 16).

The name of an RPM package tells you a lot about what’s inside it. For example, most Linux distributions include two related packages named kdeedu-3.1.4-1.i386.rpm and kdeedu-devel-3.1.4-1.i386.rpm. The naming convention for RPM packages is name-version-platform.rpm. In the first package, the name of the package is kdeedu, the version is 3.1.4.1, and the platform is i386. The second package is named kdeedu-devel and shares the same version number and platform. Here’s how you use each part of the package name:

Using RPM at the Command Line 109

Name: This part is how you refer to the package after it’s been installed. For example, if you install the kdeedu-3.1.4-1.i386.rpm package file and later want to remove it, you specify only the kdeedu part of the package name.

Version: This number is used to compare two versions of the same package — the higher the version number, the newer the package.

Platform: This part tells you which CPU the package was built for. An i386 (Intel 80386) package will run on all Intel 80386, 80486, and Pentium CPUs (and compatible CPUs like the Athlon). An i686 package will run on Pentium CPUs but may not work on older Intel CPUs. You’ll also run across PPC (PowerPC Macintoshes and IBM RISC computers) packages; you can’t use these unless you have a Power PC CPU. You may also see packages built for the noarch platform. noarch packages are not CPU-dependent. A noarch package is typically a program written in a portable language, such as Java or Python, or it may simply be a collection of text files.

The kdeedu and kdeedu-devel packages are related. The kdeedu package installs the programs and documentation you need to run KDE Education programs; kdeedu-devel installs the files that you would need if you wanted to develop (that is, alter and rebuild) the KDE Education programs. The -devel on the end of the package name is your clue that an RPM package is meant for developers rather than users.

Not all package names follow the conventions that we’ve described, but the vast majority do.

Using RPM at the

Command Line

Using RPM at the command line to install a program is an easy and straightforward process. As an example, we explain how to download and install Webmin in this section. Webmin is a great tool that we refer to in several other techniques.

Use Webmin to manage your system administration chores. It’s a browser-based tool that can help you manage users, create disk partitions, restore from backup, and more. Check it out.

If you aren’t sure about the pedigree of the package that you’re installing, see Technique 18 to find out how to trace the lineage of packages that come from dubious sources. Technique 18 explains how to use digital signatures to ensure that a package hasn’t been tampered with. A digital signature also ensures that a package comes from the person who claims to have created it in the first place.

To download and install Webmin, follow these steps:

1. Open your Web browser and surf to

www.webmin.com

2. In the upper-right corner of the screen is a link labeled RPM. Click the link to open a download page.

3. Click a Download site near you.

The Download Manager window opens.

4. Click Save to start the download and then go make a quick cup of coffee. . . .

5. Open your terminal window and navigate to the directory holding your new download.

The directory name is displayed in the status bar of the Download Manager.

6. Give yourself superuser privileges with the su command.

7. Type in the following command:

rpm -Uhv webmin-1.121-1.noarch.rpm

The easiest way to enter a long filename like this is to type the first few letters and then press Tab. (See Technique 5 for details.)

8. Press Enter.

After a short delay, rpm informs you that Webmin is installed.

Соседние файлы в предмете Операционные системы