Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm looking for ways to manage the installation of non-distro software, with multiple versions of the same software installed simultaneously. For example we'd have ProgramA 1.6 and ProgramB 1.7 installed simultaneously, and users would be able to switch between them.

A common solution to this seems to be environment modules which I know is used with success at many academic sites. Users can then just run module load ProgramA/1.6 and then running ProgramA would get them the right version. So conceptually I can maintain a repository of all the modulefiles which users would use to activate the right environment.

My problem lies mostly with creating a reproducible way to actually build the software used by the modules. I'd need a reproducible way to build each software package. What would be a good way to do this? Is it possible to achieve with RPMs in an alternate root location and/or alternate RPM db? Is there another tool I could use to manage the software builds? Should I just cobble it together with shell scripts?

The platform we're running on is Scientific Linux 6, which is basically equivalent to Red Hat 6.

share|improve this question
add comment

3 Answers

You could set up your own repository and create RPMs for your software.
If you keep multiple versions in the repository you can easily install the desired version via yum cli.

For setting up your own repository see here: click

share|improve this answer
    
I know about setting up repositories. The problem is I need to have multiple simultaneous versions installed and be able to switch between them. –  Kamil Kisiel Mar 2 '12 at 5:51
    
You can have a version suffix in the packagenames of the packages in your repository, this way yum would not complain about having multiple versions. –  Niko S P Mar 2 '12 at 6:08
add comment

Suggestions:

  1. If your software doesn't need to be installed via rpm, then take a look at the alternatives command.
  2. If your software is written in python, you could use virtualenv.
  3. If your software is written in ruby, you could use rvm.
share|improve this answer
add comment

One reasonably simple way of achieving this would be to use Stow to install each software version to its own location, then either allow users to use stow (e.g. via sudo) to repoint the application version, or use shell functions to reset PATH to point to the different software version.

I do something similar to this (without stow) for Sybase servers which have multiple database versions running on them. I have a script called setenv.sh which looks something like:

#!/bin/sh

case $1 in
  12.5|125)
      echo "Setting environment for ASE 12.5"
      export SYBASE=$HOME/ase125
      # ... some other stuff
      ;;
  15.0|150)
      echo "Setting environment for ASE 15.0"
      export SYBASE=$HOME/ase150
      # ... some other stuff
      ;;
esac
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.