Installing Tools on a Server

Installing tools on a server is always challenging, so below are the installation options, ordered from easiest to most challenging options. Remember that, by default, most installations will try to install the tool in a system-side location. You must have administrator privileges to do this and would generally have use sudo to get this to work. That won't work on TACC! (sudo means "super-user do".) So, look for ways you can install the locally, in a directory you do have access to.


First, always check if the tool is already available on the server. On TACC, you can use 

module spider <partoftoolname>

to check if it exists.You may need to load the biocontainers module and then type module spider <partoftoolname> to find modules that are containerized as part of biocontainer.

Option 1: Installing through Conda

On the tool website, look for conda installation. Python package are parceled up as conda packages that can be installed with one command:

conda install <toolname>

Option 2: Installing from Binary files

On the tool website, always look for binary files. These have already been compiled (converted from high level source code into machine specific code). So, you will just need to

  • download the version that has been compiled for your server's operating system.
  • move it to the server
  • Open it (untar and/or unzip)
  • Look for the executable file in the directory that is created
  • Consider adding the path to the executable to your PATH variable.

Installing from Source files

Source files are the trickiest to install, although they are necessary to use whenever a program has not been compiled specifically for your version of the operating system.

Download the source file and place in a local directory (such as $HOME).

It might end with .tar.gz, and if so, run

tar -zxvf FILENAME.tar.gz

If it ends with .tar

tar -xvf FILENAME.tar

Now you should have a directory named FILENAME

cd FILENAME

Usually, there will be a README or INSTALL file that will tell you how to compile this.

The four basic commands you will usually needs to run (in order) are

./configure
make
make install
make clean

./configure

./configure will check to see if all the required packages are on your system.

When you run ./configure, you can add certain options to fine tune the install. For example, you can set where the executable and any other files associated with the program will be installed.

For instance

./configure FILENAME --prefix=$HOME/bin

would put the executables in $HOME/bin rather than the default (usually /usr/local).

You can list the possible options with

./configure --help

The configure command will usually tell you what it is lacking, but you'll need to run it again and make sure it runs cleanly before you go on the next step.

make

Make compiles the code using the options you specified with the configure command.

At this point you may get errors pertaining to the options you specified.

make install

The make install command actually installs the code.

make clean

This optional step deletes any temporary files created during the install.


Alteratively, they may provide a setup bash or python script and you will need to run it.

Again, look for options such as --user,  --prefix to set up the software in your local directory instead of a directory you don't have write permissions to.

Once installed, consider adding the installed executable to your PATH variable.

First, see what PATH currently contains

echo $PATH

Then, find the location of the executable you just installed, for example, by going to the directory (typically named bin) and using pwd

pwd

Then, add this location to the PATH variable

export PATH=/home/daras/tool/bin:$PATH

echo $PATH

This PATH will only last for this session. If you'd like to make this change persistent and available everytime you log in,  add this export command to the .bashrc or .profile files in your home directory.