Archive for the 'Linux' Category

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

The Webmechs Editor on Jun 1st 2009


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.


Filed in Hosting, Linux, OS, VPS | No responses yet

Setting up Slackware - Server OS Field Stripping (Part 1, intro)

The Webmechs Editor on Jun 1st 2009


On VPS hosting, using an administration panel (e.g. cPanel, Plesk, Interworx, DirectAdmin, etc…) together with a distro such as CentOS/Debian/Ubuntu is the popular choice.  This is the conservative decision, but sometimes this just hampers flexibility to an unacceptable degree.  You are often tightly constrained regarding the versions of software you can use.  In my present case, something as fundamental as using Python 2.5 was not really a viable option under such setups.  I could try to install a second instance of Python but this is a very unwise thing to do imo and runs the risk of major breakage.  For example, I really hate to think of the things that could happen when the panel tries to update itself.

For the ultimate in flexibility, nothing comes close to Slackware.  People often shy away from setting up a server with Slackware on it because it requires doing a lot of things from scratch and might seem to be too much work.  But the advantages *are* there.  For one thing, admin panels impose serious version constraints on the software installed on your OS.  Even if you do not use a panel however, the package dependency structure of all other distros - with the exception of Slackware - can still make mixing/matching different software versions an exercise in futility.

The one thing I realized is that while Slackware does require you to setup many things from scratch, once you get the hang of it, it is essentially like field-stripping, can be done very very quickly, and largely the same process even from one version to another.  The quote in the link reads “… people were impressed many years ago with how easy it is to tear down a Model 1911 Colt pistol, they are smitten with the elegant simplicity of the M1 Garand…” and the same feeling applies once you are familiar with the elegant simplicity of Slackware.

Outlined below are the basic skills you need to master.  Once you get the hang of them, you will come to know the bliss of not relying on the slow bloat of a panel like Plesk and the untrammeled freedom to deploy pretty much whatever technologies you like on your server.

Skill #1 Using installpkg

Skill #2 Info and download location of packages and files

Skill #3 Common packages and their dependencies (easier than you think with Slackware) (article to follow)

Skill #4 Location of error and status logs (article to follow)

Skill #5 Package specific knowledge (e.g. Apache, PHP, MySQL, Python) (article to follow)

Skill #6 Setting up networking (article to follow)



Filed in Hosting, Linux, OS, VPS | No responses yet