You are here: Foswiki>CompMolBio Web>LocalInstall (18 Sep 2012, FabianPaul)Edit

Page LocalInstall

This page shows how to install software in you home directory.

Preparing the directory tree and installing the "stow" utility

GNU Stow is a small utility that allows you to manage local installations of various software packages. You start by making a local directory and building a directory tree that emulates the root file system.

cd $HOME
mkdir -p local/stow local/bin local/lib local/share local/include

Next, you install stow in this local "root".

tar xzf stow-2.2.0.tar.gz
cd stow-2.2.0/
./configure --prefix=$HOME/local
make install

In order to execute software that you installed, it needs to be in the PATH variable. In addition to the PATH, two more environment variables exist that play the role of PATH when compiling software: CPATH and LIBRARY_PATH. Furthermore the LD_LIBRARY_PATH variable tells binaries where to find their dynamic run-time libraries. We set all four variables permanently, by adding them to the ~/.bashrc file.

cd $HOME
cat >>.bashrc <<EOF
export PATH=\$HOME/local/bin:\$PATH
export CPATH=\$HOME/local/include:\$CPATH

Now you need to log out and log in again to make changes take effect.

Installing a local Gromacs version

As an useful example for local installtion, you will now install Gromacs. Gromacs depends on a package for fast Fourier transform that is not installed by default on most systems. Hence, you proceed by installing fftw.

Download an unpack fftw:

cd $HOME
tar xzf fftw-3.3.2.tar.gz
cd fftw-3.3.2

To build fftw from sources, you will need to invoke the "configure" script that is shipped with fftw.

./configure --prefix=$HOME/local/stow/fftw-3.3.2 --enable-shared --enable-single

Note that you have to give a directory name in the --prefix flag. This directory should be your $HOME/local/stow/PROG_NAME where PROG_NAME can be an arbitrary string you give to name the software package.

Next, you issue the make commands:
make install

Now make installed fftw in the directory $HOME/local/stow/fftw-3.3.2. This directory isn't in the PATH so you won't be able to use the software. To finish the install, you need to invoke the stow utility. This will create symlinks in local/bin, local/lib, ... that point to the repective binaries, libraries,... of the software package:

cd $HOME/local/stow
stow fftw-3.3.2

When you issue ls local/include/, you should now see fftw's headers.

Eventually, we reached the point were we can install Gromacs. The procedure is similar to the installation of fftw. Download and compile:
cd $HOME
tar xzf gromacs-4.5.5.tar.gz
cd gromacs-4.5.5
./configure --prefix=$HOME/local/stow/gromacs-4.5.5 
make install

And tell stow to place the symlinks:
cd $HOME/local/stow
stow gromacs-4.5.5


Installing OpenMM

cd OpenMM4.1.1-Linux64/
./ --prefix $HOME/local/stow/openmm
Enter install location (default=/usr/local/openmm): /YOURHOME/local/stow/openmm
Enter path to Python executable (default=/usr/bin/python):
cd $HOME/local/stow
stow openmm
Add to ~/.bashrc
export PYTHONPATH=$PYTHONPATH:$HOME/local/lib/python2.7/site-packages/
export OPENMM_PLUGIN_DIR=$HOME/local/lib/plugins


Topic revision: r4 - 18 Sep 2012, FabianPaul
  • Printable version of this topic (p) Printable version of this topic (p)