old-www/LDP/lame/LAME/linux-admin-made-easy/using-tarballs.html

321 lines
6.0 KiB
HTML

<HTML
><HEAD
><TITLE
>Installing or Upgrading Without RPM</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.63
"><LINK
REL="HOME"
TITLE="Linux Administration Made Easy"
HREF="index.html"><LINK
REL="UP"
TITLE="Upgrading Linux and Other Applications"
HREF="upgrading-linux.html"><LINK
REL="PREVIOUS"
TITLE="Using the Red Hat Package Manager (RPM)"
HREF="using-rpm.html"><LINK
REL="NEXT"
TITLE="Strategies for Keeping an Up-to-date System"
HREF="keeping-up-to-date.html"></HEAD
><BODY
CLASS="SECT1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Linux Administration Made Easy</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="using-rpm.html"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Chapter 10. Upgrading Linux and Other Applications</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="keeping-up-to-date.html"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="USING-TARBALLS"
>10.2. Installing or Upgrading Without RPM</A
></H1
><P
>Sometimes, you may find it necessary to install or upgrade an
application for which an RPM package is not available. Of course, it is
certainly possible to do such a thing (in fact, it is the
<SPAN
CLASS="QUOTE"
>"defacto-standard"</SPAN
> way of doing things in the so-called
<SPAN
CLASS="QUOTE"
>"real"</SPAN
> Unix world), but I would recommend against it unless
absolutely necessary (for reasons why, see <A
HREF="using-rpm.html"
>Section 10.1</A
>).</P
><P
>Should you need to install anything from tarballs, the general rule
of thumb for system-wide software installations is to place things in your
``<TT
CLASS="LITERAL"
><TT
CLASS="FILENAME"
>/usr/local/</TT
></TT
>'' filesystem.
Therefore, source tarballs would be untarred in
``<TT
CLASS="LITERAL"
><TT
CLASS="FILENAME"
>/usr/local/src/</TT
></TT
>'', while
resultant binaries would probably be installed in
``<TT
CLASS="LITERAL"
><TT
CLASS="FILENAME"
>/usr/local/bin</TT
></TT
>'', with their
configuration files in
``<TT
CLASS="LITERAL"
><TT
CLASS="FILENAME"
>/usr/local/etc/</TT
></TT
>''. Following
such a scheme will make the administration of your system a bit easier
(although, not as easy as on an RPM-only system).</P
><P
>Finally, end-users who wish to install software from tarballs for
their own private use will probably do so under their own home
directory.</P
><P
>After downloading the tarball from your trusted software archive
site, change to the appropriate top-level directory and untar the archive
by typing commands (as root, if necessary) as in the following
example:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="SCREEN"
>tar zxvpf cardgame.tar.gz</PRE
></TD
></TR
></TABLE
><P
>The above command will extract all files from the example
``<TT
CLASS="LITERAL"
><TT
CLASS="FILENAME"
>cardgame.tar.gz</TT
></TT
>'' compressed
archive. The ``<TT
CLASS="LITERAL"
>z</TT
>'' option tells tar that the archive
is compressed with gzip (so omit this option if your tarball is not
compressed); the ``<TT
CLASS="LITERAL"
>x</TT
>'' option tells tar to extract all
files from the archive. The ``<TT
CLASS="LITERAL"
>v</TT
>'' option is for
verbose, listing all filenames to the display as they are extracted. The
``<TT
CLASS="LITERAL"
>p</TT
>'' option maintains the original and permissions the
files had as the archive was created. Finally, the
``<TT
CLASS="LITERAL"
>f</TT
>'' option tells tar that the very next argument is
the file name. Don't forget that options to tar are
cAsE-sEnSiTiVe.</P
><DIV
CLASS="CAUTION"
><P
></P
><TABLE
CLASS="CAUTION"
BORDER="1"
WIDTH="100%"
><TR
><TD
ALIGN="CENTER"
><B
>Caution</B
></TD
></TR
><TR
><TD
ALIGN="LEFT"
><P
>Caution: As mentioned in <A
HREF="server-restore.html#TAR-RESTORE"
>Section 8.2.1</A
>, I
recommend first using the ``<EM
>t</EM
>'' option to display the
archive contents to verify the contents prior to actually extracting the
files. Doing so may help avoid extracting files to unintended locations,
or even worse, inadvertently overwriting existing files.</P
></TD
></TR
></TABLE
></DIV
><P
>Once the tarball has been installed into the appropriate directory,
you will almost certainly find a
``<TT
CLASS="LITERAL"
><TT
CLASS="FILENAME"
>README</TT
></TT
>'' or a
``<TT
CLASS="LITERAL"
><TT
CLASS="FILENAME"
>INSTALL</TT
></TT
>'' file included with
the newly installed files, with further instructions on how to prepare
the software package for use. Likely, you will need to enter commands
similar to the following example:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="SCREEN"
>./configure
make
make install</PRE
></TD
></TR
></TABLE
><P
>The above commands would configure the software to ensure your
system has the necessary functionality and libraries to successfully
compile the package, compile all source files into executable binaries,
and then install the binaries and any supporting files into the
appropriate locations. The actual procedures you will need to follow may,
of course, vary between various software packages, so you should read any
included documentation thoroughly.</P
><P
>Again, unless it is absolutely necessary, I really recommend
avoiding tarballs and sticking to RPM if you can.</P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="using-rpm.html"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="keeping-up-to-date.html"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Using the Red Hat Package Manager (RPM)</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="upgrading-linux.html"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Strategies for Keeping an Up-to-date System</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>