LDP/LDP/howto/linuxdoc/RPM+Slackware.sgml

129 lines
3.7 KiB
Plaintext

<!doctype linuxdoc system>
<article>
<title>RPM+Slackware Mini-Howto
<author>Dave Whitinger, <tt/dave@whitinger.net/
<date>v1.3, 13 April 1998
<abstract>
This document describes how to get RPM installed and working
properly under Slackware. The information contained herein,
however, is probably applicable to any Linux distribution.
</abstract>
<toc>
<sect>Introduction
<p>
RPM is the "Red Hat Package Manager" and is the heart of the
Red Hat Linux distribution. It's most basic functionality is
to install and de-install packages.
This document is geared toward installing RPM on a slackware
system using an Intel processor, but the information contained
herein should be applicable to any distribution.
The latest version of this HOWTO is always available at <url url="http://www.threepoint.com/HOWTO/RPM+Slackware.html">
For further reading, consult the RPM-HOWTO (available at your
neighborhood LDP mirror). Also, consider buying a copy of
the excellent book, Maximum RPM, by Ed Bailey of Red Hat Software, Inc.
<sect>Obtaining the software
<p>
The newest release of RPM is always available from:
<tscreen><verb>
ftp.rpm.org/pub/rpm/dist/latest
</verb></tscreen>
As of this writing, the latest version was
<tscreen><verb>
rpm-2.4.12-1.i386.tar.gz
</verb></tscreen>
Notice the .i386 section. This means that it is a binary package for the
Intel architecture, ready to untar and run. Make sure that the file
you download has the i386 in the filename, otherwise the following
instructions will not work.
<sect>Installing the software
<p>
The easiest way to install RPM is to use Slackware's native package manager.
You must be root to install RPM.
<tscreen><verb>
installpkg /home/dave/rpm-2.4.12-1.i386.tar.gz
</verb></tscreen>
Of course, replace the /home/dave with the correct path for the filename.
(NOTE!) If that fails, simply untar the file with these commands:
<tscreen><verb>
cd / ; tar zxvpf /home/dave/rpm-2.4.12-1.i386.tar.gz
</verb></tscreen>
Next, you have to create a directory called "rpm" under the /var/lib tree.
mkdir /var/lib/rpm
Now type 'rpm --initdb' to initialize the rpm database.
If everything has gone correctly up to this point, you will have a
rpm-capable system! Test it out by grabbing any rpm file and
installing it with 'rpm -Uvh filename.rpm'
<sect>Bugs (Important!)
<p>
Be aware that on several versions of RPM, the tar file has been created using incorrect permissions.
As soon as you install RPM, check your permissions of various directories (/bin, /usr, etc). If the permissions are of 700 (drwx------), then you have been infected by the bug.
To fix these permissions problems, run this shell script:
<code>
#!/bin/sh
chmod 755 /bin
chmod 755 /usr
chmod 755 /usr/bin
chmod 755 /usr/doc
chmod 755 /usr/lib
chmod 755 /usr/man
chmod 755 /usr/man/man8
chmod 755 /usr/share
chmod 755 /usr/share/locale
chmod 755 /usr/share/locale/de
chmod 755 /usr/share/locale/de/LC_MESSAGES
chmod 755 /usr/share/locale/pt-br
chmod 755 /usr/share/locale/pt-br/LC_MESSAGES
chmod 755 /usr/share/locale/sv
chmod 755 /usr/share/locale/sv/LC_MESSAGES
chmod 755 /usr/src
</code>
Feel free to E-Mail me if you have any questions about this.
<sect>Acknowledgements
<P>
I recognize Red Hat Software, Inc. and Patrick Volkerding for their fine Linux distributions.
Thanks to Milan Kopacka (mkop5230@ss1000.ms.mff.cuni.cz) for bringing to my attention a better way to install RPM (installpkg).
<sect>Copyright
<P>
This HOWTO is copyright 1998 by Dave Whitinger, and is a free document. You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or any later version.
</article>