Additional Software on Debian/stable

Often it makes sense to install software that doesn't come from the official Debian repository. E.g., we want to try out some newer version than the one available in the stable version. We may not want to use a backport since that would replace the official version and we would rather use the new version in parallel.

There are two established methods in the Unix world to install additional software not coming from the official vendor, distribution, or repository. One tradition uses /usr/local as the top of a complete tree with bin, lib, etc, sbin, and all other directories that would normally be in /usr or / (root). The other uses /opt and creates a directory per package. The two methods are complementary depending on whether you want to keep packages separate from each other (/opt) or seamlessly blend them into a normal software tree (/usr/local). Debian supports both methods in that regular packages leave both places alone.

It is a good idea to install such software as non-root. After all there are often special requirements, e.g., we may try bleeding edge or beta software. Otherwise we would use (or create) regular Debian packages.

### create /opt and its user
# mkdir -p /opt/src
# adduser --home /opt/src --uid 701 opt
# chown -R opt.opt /opt
### create /usr/local and its user
# mkdir -p /usr/local/src
# adduser --home /usr/local/src --uid 702 local
# chown -R local.local /usr/local

We can then switch to the appropriate user to compile and install software, e.g., with

# su - opt
$ whoami
opt
$ pwd
/opt/src
$ 
Elmar Heeb, 2005/12/17 21:35:03.141 GMT+1