Setting up Slackware on a VPS (Part 2, using installpkg and getting packages)

The most basic thing one needs to learn when setting up Slackware (on a VPS, especially) is how to get various packages and install them.  This is most easily done via the wget and installpkg commands.

http://slackware.com/getslack has a list of mirrors where you can get slackware packages. Packages will be found within a directory named slackware-VV/slackware/X where VV is the Slackware distribution version and X specifies the package category.

The relevant package categories for VPS hosting are as follows:

a – base packages (VPS templates will already have installed most of the needed packages here)
ap – common applications
d – development (gcc, python, perl, ruby, etc…)
f – faqs and how-tos
l – libraries
n – networking (includes networking utilities and daemons such as Apache)

The file slackware-VV/Slackware-HOWTO will have more comprehensive info on this.  What I recommend doing is to create a directory downloaded-packages/ under /root where you store all your downloaded packages.  Once in there you can execute wget to fetch the packages you want.  For example, if you choose to download the mysql package from the pair.com mirror listed at http://www.slackware.com/getslack/list.php?country=USA, you can type:

wget http://slackware.mirrors.pair.com/slackware-12.2/slackware/ap/mysql-5.0.67-i486-1.tgz

Installing the package is as easy as:

installpkg mysql-5.0.67-i486-1.tgz

It just unpacks the .tgz file and puts the package’s files in the correct directory locations.  It doesn’t check for dependencies and generally doesn’t whine or try to be smarter about it than you.  Just the way the gods intended it to be.

Two additional files you should know about are slackware-VV/slackware/PACKAGES.TXT and slackware-VV/slackware/MANIFEST.bz2. PACKAGES.TXT contains a description of the each package you might be looking for together with the directory it is under.  MANIFEST.bz2 is a complete list of every single file in every single package.

Possibly the most important Slackware tip to know is: If you see an error message complaining that so-and-so file is missing or cannot be found, you can search for it in MANIFEST.bz2 to know which package you need to install. *This* is *the* most educational and satisfying way to learn about what packages depend on which other ones, and in practice it has yet to fail me. The catch here is that you should be able to know where such error messages may be found (which will be dealt with in a later post of this blog series).

A quick way to search inside MANIFEST.bz2 is to do: bzcat MANIFEST.bz2 | less or bzcat MANIFEST2.bz2 | grep xxx.   See this for a walkthrough on the process.

Leave a Reply

Your email address will not be published. Required fields are marked *