Worked Example of Installing Software In user-maint
- Introduction
- Download and untar the software
- Install the software
- Index (add to INDEX file so other people can see what you've installed)
Introduction
This is a walkthrough of how to install software which Eva sent to lb372 when she asked for the package "Merlin" to be installed. As all software is different, it is not possible to give exact instructions, and this must be treated as a rough guide, not followed religiously without understanding.
Download and untar the software
First you download the software into /alt/applic/user-maint/lb372. Most software comes in the form of tarballs (.tar.gz or .tgz files). Look inside them with a command like this:
tar tzvf merlin-1.1.2.tar.gz
This tells me two useful things. One is that the tarball will untar to a single directory called merlin-1.1.2. Some tarballs don't, in which case it's wise to move them to a directory of their own before untarring them, so you don't get all your software mixed up together. The other is that the examples are included so I don't need the separate tarball of just the examples.
Now untar the tarball and look inside the new directory:
tar xzvf merlin-1.1.2.tar.gz cd merlin-1.1.2 ls
Install the software
Look for files which seem likely to contain installation instructions. Here we have a file called README, which tells you "type make and follow instructions". It is also good to take a quick look at the Makefile, but do not worry if you do not understand it. In this case there is just one thing near the beginning which it is useful to change:
# default installation directory INSTALLDIR=/usr/local/bin
You can't install software in /usr/local/bin (only the superuser can do that). I have made you a directory /alt/applic/user-maint/lb372/bin and added it to your PATH. We change the INSTALLDIR line to
INSTALLDIR=/alt/applic/user-maint/lb372/bin
(When editing the Makefile emacs came up with an error message "Suspicious line 245". This was a line which looked blank but contained a tab, which can confuse "make". I replaced it by an actual blank line.)
Typing "make" tells me the following:
MERLIN Source Distribution This Makefile will compile and install merlin on your system Type... To... make help Display this help screen make all Compile merlin and related tools make install Install binaries in /alt/applic/user-maint/lb372/bin make install INSTALLDIR=directory_for_binaries Install binaries in directory_for_binaries make clean Delete temporary files
Now type "make all" and wait while the messages scroll by. There weren't any errors, so type "make install".
Index the software
Finally, add the software to the INDEX file in /alt/applic/user-maint/lb372 so that other people can see what you have installed.