⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 528-533.html

📁 linux-unix130.linux.and.unix.ebooks130 linux and unix ebookslinuxLearning Linux - Collection of 12 E
💻 HTML
字号:
<HTML>

<HEAD>

<TITLE>Using Linux:Managing Applications</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=0789716232//-->

<!--TITLE=Using Linux//-->

<!--AUTHOR=William Ball//-->

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

<!--IMPRINT=Que//-->

<!--CHAPTER=30//-->

<!--PAGES=528-533//-->

<!--UNASSIGNED1//-->

<!--UNASSIGNED2//-->



<CENTER>

<TABLE BORDER>

<TR>

<TD><A HREF="524-528.html">Previous</A></TD>

<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>

<TD><A HREF="533-540.html">Next</A></TD>

</TR>

</TABLE>

</CENTER>

<P><BR></P>

<P>If a package is verified correctly, <TT>rpm</TT> does not output anything. If <TT>rpm</TT> detects a difference between the installed package and the database record, it outputs an 8-character string in which tests that fail are represented by a single character, and tests that pass are represented by a period (.). The characters for failed tests are listed in Table 30.3.</P>

<TABLE WIDTH="100%"><CAPTION ALIGN=LEFT><B>TABLE 30.3</B> Characters for failed verification tests

<TR>

<TH COLSPAN="2"><HR>

<TR>

<TH WIDTH="25%" ALIGN="LEFT">Letter

<TH WIDTH="75%" ALIGN="LEFT">Failed Test

<TR>

<TD COLSPAN="2"><HR>

<TR>

<TD><TT>5</TT>

<TD>MD5 Sum

<TR>

<TD><TT>S</TT>

<TD>File Size

<TR>

<TD><TT>L</TT>

<TD>Symlink

<TR>

<TD><TT>T</TT>

<TD>Mtime

<TR>

<TD><TT>D</TT>

<TD>Device

<TR>

<TD><TT>U</TT>

<TD>User

<TR>

<TD><TT>G</TT>

<TD>Group

<TR>

<TD><TT>M</TT>

<TD>Mode (permissions and file type)

<TR>

<TD COLSPAN="2"><HR>

</TABLE>

<P>For example, on my system, verifying the <TT>bash</TT> package using <TT># rpm -V bash</TT> fails:</P>

<!-- CODE SNIP //-->

<PRE>

.M..L...  /bin/bash

....L...  /bin/sh

</PRE>

<!-- END CODE SNIP //-->

<P>This indicates that the size of my <TT>bash</TT> is different from the information stored in the database. This is okay on my system because I have recompiled <TT>bash</TT>.</P>

<P>In addition, it is possible to use the query option <TT>-f</TT> to verify a package containing a particular file, which is helpful when diagnosing problems with programs:</P>

<!-- CODE SNIP //-->

<PRE>

<B># rpm -Vf /bin/ksh</B>

</PRE>

<!-- END CODE SNIP //-->

<P>If <TT>ksh</TT> were behaving peculiarly, the preceding line would verify the package that <TT>ksh</TT> came in. If any of the tests fail, at the very least you will be closer to understanding the source of the problems.</P>

<H4 ALIGN="LEFT"><A NAME="Heading9"></A><FONT COLOR="#000077">Using Red Hat&#146;s X11 <I>glint</I> Client to Manage <I>rpm</I> Packages

</FONT></H4>

<P>The most common way most users interact with <TT>rpm</TT> is via <TT>glint</TT>, the graphical Linux installation tool. <TT>glint</TT> is an X-based interface for <TT>rpm</TT> that allows for installing, uninstalling, querying, and verifying packages via a graphical File Manager interface.</P>

<P><TT>glint</TT> is accessible from the command line or the Control Panel application that comes with Red Hat Linux. You must be the root operator, or must use the <TT>su</TT> command to run <TT>glint</TT>. <TT>glint</TT> can also be accessed from the command line of a terminal window by simply typing the following at the prompt:</P>

<!-- CODE SNIP //-->

<PRE>

<B># glint</B>

</PRE>

<!-- END CODE SNIP //-->

<P><TT>glint</TT> accepts no command-line options. When <TT>glint</TT> is loading, a message such as the following appears in the terminal window:</P>

<!-- CODE SNIP //-->

<PRE>

Glint Graphical Package Manager -- version 2.1.5 Copyright 1996 Red

Hat Software

This may be freely redistributed under the terms of the GNU Public License

</PRE>

<!-- END CODE SNIP //-->

<P>After <TT>glint</TT> has loaded, a window similar to Figure 30.1 appears.</P>

<P><A NAME="Fig1"></A><A HREF="javascript:displayWindow('images/30-01.jpg',656,509 )"><IMG SRC="images/30-01t.jpg"></A>

<BR><A HREF="javascript:displayWindow('images/30-01.jpg',656,509)"><FONT COLOR="#000077"><B>Figure 30.1</B></FONT></A>&nbsp;&nbsp;The primary <TT>glint</TT> window displays folders of installed software packages.

</P>

<BLOCKQUOTE>

<P><FONT SIZE="-1"><HR><B>SEE ALSO</B>

<DL>

<DD><B>&#149;</B>&nbsp;&nbsp;For more information about the X Window System, see page 260.

<DD><B>&#149;</B>&nbsp;&nbsp;To learn more about how to begin a superuser, and using the <TT>su</TT> command with Linux, see page 5.

</DL>

<HR></FONT>

</BLOCKQUOTE>

<P>The folders displayed in this window correspond to different groups or classes of packages. In each group, there can be subgroups as well, which are represented as folders within folders. Any files displayed in the folders represent the currently installed packages of a particular group. These are the main groups into which packages can be installed:

</P>

<DL>

<DD><B>&#149;</B>&nbsp;&nbsp;Applications

<DD><B>&#149;</B>&nbsp;&nbsp;Base

<DD><B>&#149;</B>&nbsp;&nbsp;Daemons

<DD><B>&#149;</B>&nbsp;&nbsp;Development

<DD><B>&#149;</B>&nbsp;&nbsp;Documentation

<DD><B>&#149;</B>&nbsp;&nbsp;Games

<DD><B>&#149;</B>&nbsp;&nbsp;Libraries

<DD><B>&#149;</B>&nbsp;&nbsp;Networking

<DD><B>&#149;</B>&nbsp;&nbsp;Shells

<DD><B>&#149;</B>&nbsp;&nbsp;Utilities

<DD><B>&#149;</B>&nbsp;&nbsp;X11

</DL>

<P>From the main <TT>glint</TT> window, different packages can be selected and queried, verified, uninstalled, or installed. When you click the Available button, all packages available for installation from the default location (<TT>/mnt/cdrom/RedHat/RPMS</TT>) are listed in a separate window similar to Figure 30.2.</P>

<P><A NAME="Fig2"></A><A HREF="javascript:displayWindow('images/30-02.jpg',656,507 )"><IMG SRC="images/30-02t.jpg"></A>

<BR><A HREF="javascript:displayWindow('images/30-02.jpg',656,507)"><FONT COLOR="#000077"><B>Figure 30.2</B></FONT></A>&nbsp;&nbsp;The Available Packages <TT>glint</TT> window shows software on your Red Hat CD-ROM that has not yet been installed on your system.

</P>

<P>By navigating through the folders, you can select and install different packages. As an example, let&#146;s take a look at installing the <TT>vim</TT> package.</P>

<P><FONT SIZE="+1"><B><I>Installing the <I>vim</I> Package with the g<I>lint</I> Client

</I></B></FONT></P>

<DL>

<DD><B>1.</B>&nbsp;&nbsp;To install the <TT>vim</TT> package, first log on as the root operator, and then launch <TT>glint</TT> from the command line of a terminal window:

<!-- CODE SNIP //-->

<PRE>

<B># glint &#38;</B>

</PRE>

<!-- END CODE SNIP //-->

<DD><B>2.</B>&nbsp;&nbsp;Insert and mount your Red Hat CD-ROM. When <TT>glint</TT>&#146;s Installed Packages window appears, click the Available button.

<DD><B>3.</B>&nbsp;&nbsp;After a short period of your CD-ROM&#146;s disk activity, the Available Packages window appears. Select the Applications folder and then the Editors folder.

<DD><B>4.</B>&nbsp;&nbsp;Click the package <TT>vim-4.5-2</TT>, which becomes highlighted (see Figure 30.3).

<P><A NAME="Fig3"></A><A HREF="javascript:displayWindow('images/30-03.jpg',652,508 )"><IMG SRC="images/30-03t.jpg"></A>

<BR><A HREF="javascript:displayWindow('images/30-03.jpg',652,508)"><FONT COLOR="#000077"><B>Figure 30.3</B></FONT></A>&nbsp;&nbsp;Available Packages with <TT>vim</TT> selected.

</P>

<DD><B>5.</B>&nbsp;&nbsp;When a package is highlighted, it can be installed by clicking the Install button. You can install many packages at once by highlighting more than one package.

<DD><B>6.</B>&nbsp;&nbsp;When you click the Install button, the Installing dialog box appears (see Figure 30.4). This dialog box shows the progress of the installation.

<P><A NAME="Fig4"></A><A HREF="javascript:displayWindow('images/30-04.jpg',416,216 )"><IMG SRC="images/30-04t.jpg"></A>

<BR><A HREF="javascript:displayWindow('images/30-04.jpg',416,216)"><FONT COLOR="#000077"><B>Figure 30.4</B></FONT></A>&nbsp;&nbsp;The Installing dialog box shows the progress of package installation.</P>

<BR>After <TT>vim</TT> has been installed, it is removed from the Available Packages window.

</DL>

<P>In this example, I assumed that the available packages were stored in the default location mentioned earlier. Often that is not the case. You can change this location by clicking the Configure button and entering a different location where package files are located in the Changing dialog box (see Figure 30.5).

</P>

<P><A NAME="Fig5"></A><A HREF="javascript:displayWindow('images/30-05.jpg',376,136 )"><IMG SRC="images/30-05t.jpg"></A>

<BR><A HREF="javascript:displayWindow('images/30-05.jpg',376,136)"><FONT COLOR="#000077"><B>Figure 30.5</B></FONT></A>&nbsp;&nbsp;Changing the package location is a convenient way to install <TT>rpm</TT> packages from somewhere else besides CD-ROM.

</P>

<P><TT>glint</TT> also provides a nice front end for querying packages. <TT>glint</TT> executes most of the queries automatically and displays the results in a tabular form. For example, a query of the <TT>vim</TT> package looks similar to Figure 30.6.</P>

<P><A NAME="Fig6"></A><A HREF="javascript:displayWindow('images/30-06.jpg',656,511 )"><IMG SRC="images/30-06t.jpg"></A>

<BR><A HREF="javascript:displayWindow('images/30-06.jpg',656,511)"><FONT COLOR="#000077"><B>Figure 30.6</B></FONT></A>&nbsp;&nbsp;Query of the <TT>vim</TT> package.

<P><BR></P>

<CENTER>

<TABLE BORDER>

<TR>

<TD><A HREF="524-528.html">Previous</A></TD>

<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>

<TD><A HREF="533-540.html">Next</A></TD>

</TR>

</TABLE>

</CENTER>





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

<!-- begin footer information -->





</body></html>

⌨️ 快捷键说明

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