Search code examples
phppythonmysqlvirtualenvlamp

Install LAMP Stack into Virtual Environment


I want to isolate my LAMP installment into a virtual environment, I tried using virtualbox but my 4GB of RAM is not helping. My question is if I run sudo apt-get install lamp-server^ while in "venv"... would it install the mysql-server, apache2 and PHP into the virtualenv only or is the installation scope system-wide.

I really want a good solution for isolating these dev environments and their dependencies, and am hence exploring simple and efficient options given my system constraints. I have another Django (and mysql and gcloud) solution on the same computer and would like for these new installations to not mess with this.

I'm using:

OS: Ubuntu 16.04 LTS

Python: 2.7


Solution

  • VirtualEnv is only for Python. If you want something "similar" to VirtualEnv (which is basically just a local installation of python, not a full virtualized system), then check out https://docker.com/ or other similar "containerization" solutions.