Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I was sure that I would find this question, but I couldn't. How to create an isolated development environment? It other words, a sandbox, where I can install different combinations of web servers, databases, other software packages and play with them, without cluttering my system packages and without manually downloading packages from official websites. Something for software stacks as virtualenv + pip is for Python.

Before that I tried to install OSes inside QEMU/KVM, but that is an overkill and a bit complicated (couldn't set up bridging, for example). Is it possible to create isolated virtual environments without running virtual machines with full-blown operating systems?

I use Debian GNU/Linux.

Edit (01.08.12): A similar question on Unix.SE with more elaborated answers - http://unix.stackexchange.com/q/31136/11397

share|improve this question

2 Answers 2

up vote 1 down vote accepted

You may find Environment Modules worth looking at.

We use it extensively to give users access to a wide variety of applications, without those apps being on their command line path unless they need them to be.

We also use it to give people the option of which version of software they want to use. For instance, we have various versions of python available:

$ python -V
Python 2.4.3
$ module avail python

----------------------- /apps/Modules/modulefiles -----------------------
python/2.6                   python/2.7.2-64
python/2.6.2                 python/3.2
python/2.6.6(default)        python/3.2.0
python/2.7                   python/3.2.2
python/2.7.1                 python/2.7.2
$ module load python
$ python -V
Python 2.6.6
$ module load python/2.7.1
$ python -V
Python 2.7.1
$

It only really modifies environment variables, but it may be just the lightweight context switch that you need.

share|improve this answer

To some extent you can achieve your goals under Linux/Unix in chroot'ed environments and jails.

I'd stongly advise to use virtual machines, though.

You might find this table on wikipedia helpful. It seems like OpenVZ might be worth a look. For Windows, sanboxie might also be worth an evaluation.

share|improve this answer

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.