简体   繁体   English

将LAMP Stack安装到虚拟环境中

[英]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. 我想将LAMP的一部分隔离到虚拟环境中,我尝试使用virtualbox,但4GB的RAM却无济于事。 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. 我的问题是,如果我在“ venv”中运行sudo apt-get install lamp-server ^ ...它将仅将mysql-server,apache2和PHP安装到virtualenv中,还是在整个系统范围内安装。

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. 我在同一台计算机上有另一个Django(以及mysql和gcloud)解决方案,并希望这些新安装不会与此混淆。

I'm using: 我正在使用:

OS: Ubuntu 16.04 LTS 操作系统:Ubuntu 16.04 LTS

Python: 2.7 的Python:2.7

如果您想在没有虚拟机的情况下创建单独的环境,请阅读有关Docker的信息。

VirtualEnv is only for Python. VirtualEnv仅适用于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. 如果您想要与VirtualEnv“类似”的东西(基本上只是python的本地安装,而不是完整的虚拟化系统),请查看https://docker.com/或其他类似的“容器化”解决方案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM