0001-0006.html

来自「linux-unix130.linux.and.unix.ebooks130 l」· HTML 代码 · 共 245 行

HTML
245
字号






<HTML>

<HEAD>

<TITLE>Maximum RPM (RPM):An Introduction to Package Management:EarthWeb Inc.-</TITLE>

<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<SCRIPT>
<!--
function displayWindow(url, width, height) {
        var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>

 -->




<!-- ISBN=0672311054 //-->

<!-- TITLE=Maximum RPM (RPM)//-->

<!-- AUTHOR=Edward Bailey//-->

<!-- PUBLISHER=Macmillan Computer Publishing//-->

<!-- IMPRINT=Sams//-->

<!-- CHAPTER=01 //-->

<!-- PAGES=0001-0016 //-->

<!-- UNASSIGNED1 //-->

<!-- UNASSIGNED2 //-->









<P><CENTER>

<a href="../about.html">Previous</a> | <a href="../ewtoc.html">Table of Contents</a> | <a href="0007-0009.html">Next</a></CENTER></P>



<A NAME="PAGENUM-1"><P>Page 1</P></A>



<H2>

<A NAME="ch01_ 0">

Part I<br>

</a>

</H2>

RPM and Computer Users: How to Use RPM to Effectively Manage <BR>

Your Computer



<A NAME="PAGENUM-2"><P>Page 2</P></A>







<A NAME="PAGENUM-3"><P>Page 3</P></A>







<H2>

<A NAME="ch01_ 1">

Chapter 1<br>

An Introduction to<BR>Package Management

</A>

</H2>



<A NAME="PAGENUM-4"><P>Page 4</P></A>









<H3><A NAME="ch01_ 2">

1.1. What Are Packages and Why Manage Them?

</A></H3>



<P>To determine what packages are and why it's important to manage them, let's go back to

the basics for a moment. Computers process information. To process information you must have a few things:

</P>



<UL>

<LI>          A computer (obviously)

<LI>          Some information to process (also obviously)

<LI>          A program to do the processing (still pretty obviously)

</UL>



<P>Unless these three things come together, very little information processing is going to happen. But each of these items has its own requirements that need to be satisfied before things can

get exciting.

</P>



<P>Take the computer, for example. While it needs things such as electricity and a cool, dry

place to operate, it also needs access to the other two items&#151;information and programs&#151;in

order to do its thing. The way to get information and programs into a computer is to place them

in the computer's mass storage. These days, mass storage invariably means a disk drive.

Putting information and programs on the disk drive means that they are stored as files.

</P>



<P>Okay, let's look at the information. Does information have any particular needs? Well, it

needs sufficient space on the disk drive, but more importantly, it needs to be in the proper format

for the program that will be processing it. That's it for information.

</P>



<P>Finally, we have the program. What does it need? Like the information, it needs sufficient

disk space on the disk drive. But there are many other things it might need:

</P>



<UL>

<LI>          It might need information to process, in the correct format, named properly, and

in the appropriate area on a disk drive.

<LI>          It might need one or more configuration files. These are files that control

the program's behavior and permit some level of customization. Like the

information, these files must be in the proper format, named properly, and in the appropriate area on a disk. We'll be referring to them by their other name&#151;config

files&#151;throughout the book.

<LI>          It might need to have work areas on a disk and need to be named properly and

located in the appropriate area.

<LI>          It might even need other programs, each with their own requirements.

<LI>          Although not strictly required by the program itself, the program might come

with one or more files containing documentation. These files can be very handy for the humans trying to get the program to do their bidding!

</UL>



<A NAME="PAGENUM-5"><P>Page 5</P></A>







<P>As you can imagine, this can get pretty complicated. It's not so bad once everything is set

up properly, but how do things get set up properly in the first place? There are two possibilities:

</P>



<UL>

<LI>          After reading the documentation that comes with the program you'd like to use,

copy the various programs, config files, and information onto your computer, making sure they are all named correctly and are located in the proper place, and that there is sufficient disk space to hold them all. Then make the appropriate changes to the configuration file(s). Finally, run any setup programs that are necessary, giving them whatever information they require to do their job.

<LI>          Let the computer do it for you.

</UL>



<P>If it seems like the first choice isn't so bad, consider how many files you'll need to keep

track of. On a typical Linux system, it's not unusual to have more than 20,000 different files.

That's a lot of documentation reading, file copying, and configuring! And what happens when

you want a newer version of a program? More of the same!

</P>



<P>Some people think the second alternative is easier. RPM was made for them.

</P>



<H4><A NAME="ch01_ 3">

1.1.1. Enter the Package

</A></H4>



<P>When you consider that computers are very good at keeping track of large amounts of

data, the idea of giving your computer the job of riding herd over 20,000 files seems like a good

one. And that's exactly what package management software does. But what is a package?

</P>



<P>A package in the computer sense is very similar to a package in the physical sense. Both

are used to keep related objects together in the same place. Both need to be opened before

the contents can be used. Both can have a packing slip taped to the side, identifying the contents.

</P>



<P>Normally, package management systems take all the various files containing programs,

data, documentation, and configuration information, and place them in one specially formatted

file&#151;a package file. In the case of RPM, the package file is sometimes called a package, an .rpm file, or even an RPM. All these terms refer to a package containing software meant to be

installed using RPM.

</P>



<P>What types of software are normally found in a package? There are no hard-and-fast rules,

but normally a package's contents consist of one of the following types of software:

</P>



<UL>

<LI>          A

collection of one or more programs that perform a single, well-defined task. This

is normally what people think of as an application. Word processors and

programming languages would fit into this category.

<LI>          A specific part of an operating system. Examples include system initialization scripts,

a particular command shell, or the software required to support a Web server.

</UL>



<A NAME="PAGENUM-6"><P>Page 6</P></A>



<B>

1.1.1.1. Advantages of a Package

</B>



<P>One of the most obvious benefits to having a package is that the package is one easily

manageable chunk. If you move it from one place to another, there's no risk of any part getting

left behind. Although this is the most obvious advantage, it's not the biggest one. The biggest

advantage is that the package can contain the knowledge about what it takes to install itself

on your computer. And if the package contains the steps required to install itself, the package

can also contain the steps required to uninstall itself. What used to be a painful manual process

is now a straightforward procedure. What used to be a mass of 20,000 files becomes a

couple hundred packages.

</P>



<H4><A NAME="ch01_ 4">

1.1.2. Manage Your Packages or They Will Manage You

</A></H4>



<P>A couple hundred packages? Even though the use of packages has decreased the complexity

of managing a system by an order of magnitude, it hasn't yet gotten to the level of being a

no-brainer. It's still necessary to keep track of what packages are installed on your system. And

if some packages require other packages in order to be installed or operate correctly, these

should be tracked as well.

</P>



<B>

1.1.2.1. Packages Lead Active Lives

</B>



<P>If you start looking at a computer system as a collection of packages, you'll find that a

distinct set of operations will take place on those packages time and time again:

</P>



<UL>

<LI>          New packages are installed. Maybe it's a spreadsheet you'll use to keep track

of expenses, or the latest shoot-'em-up game, but in either case it's new and you want it.

<LI>         Old packages are replaced with newer versions. The company that wrote the

word processor you use daily comes out with a new version. You'll probably want to install the new version and remove the old one.

<LI>          Packages are removed entirely. Perhaps that overhyped strategy game just didn't cut it. You have better things to do with that disk space, so get rid of the game!

</UL>



<P>With this much activity going on, it's easy to lose track of things. What types of package information should be available to keep you informed?

</P>



<B>

1.1.2.2. Keeping Track of Packages

</B>



<P>Just as certain operations are performed on packages, there are also certain types of

information that will make it easier to make sense of the packages installed on your system:

</P>



<UL>

<LI>          Certainly you'd like to be able to see what packages are installed. It's easy to

forget whether the fax program you tried a few months ago is still installed.

</UL>



<P><CENTER>

<a href="../about.html">Previous</a> | <a href="../ewtoc.html">Table of Contents</a> | <a href="0007-0009.html">Next</a></CENTER></P>











</td>
</tr>
</table>

<!-- begin footer information -->







</body></html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?