php - 为 Web 开发人员预装 Linux?

标签 php linux development-environment

是否有人知道针对具有以下一项、部分或全部功能的 Web 开发人员的最新 Linux 发行版的 ISO 镜像:

  • LAMP 堆栈易于设置(已安装 Apache 2、虚拟站点目录结构(托管)、PHP 安装、mySQL 安装)

  • 为初学者设置 Ruby/RoR

  • 为多个存储库设置 Subversion

  • 防火墙配置为用作 Web 服务器(端口 80 开放,其他不多)

  • Python 和 Trac 已安装并与 Apache 集成(支持多环境)

背景:

我有一个功能强大的新工作站,想设置一些虚拟机用于测试、开发和版本控制,最好是在 Linux 上。这些机器不会向公众公开。

我想节省尽可能多的安装和设置工作 - 如果我一个人完成,设置上述列表中的所有内容将花费我数周时间。

Bounty

I have had to put this on the shelf for the time being due to other, more pressing projects. The suggestions made are already a brilliant list; I'm putting a bounty on the question to try and gather as much input as possible, so this can be the reference question on the issue for future generations.

I will be awarding the bounty either based on popular vote or on a whim, from what looks the best solution to me.

最佳答案

说真的,我认为最好的办法是创建自己的。例如,有些人使用 Redmine 而不是 Trac。找到具有这些特定安装的预配置 VM 将很困难。

因此,以“创建自己的”为前提,我相信您有以下选择:

使用“VM Aware”发行版


想到 Ubuntu 服务器:it has an option to install a minimal installation specific to VMs .

Download the server ISO image, boot from it, press F4 on the first screen and select "Install a minimal virtual machine".

  • Less than 380MB installed footprint
  • Specialized server Kernel (-virtual)
  • Optimised for VMWare ESX, VMWare Server and KVM Intel or AMD x86 architecture
  • Minimum memory 128MB
  • No graphical environment preloaded as it is aimed at server virtual appliance

恕我直言,您最多只能花费一天的时间来根据自己的喜好配置虚拟机,而不是数周。使用 apt-get 可以为您在功能列表中的几乎所有软件包中节省一些时间。

...如果你想要更多的自定义,你甚至可以尝试使用 vmbuilder .

vmbuilder is a script that automates the process of creating a ready to use VM based on Ubuntu. There is no need for a JeOS CD image. The currently supported hypervisors are KVM, Xen and VMware.

使用知名发行版并“剥离”


安装 minimal Debian system并剥离一些功能,或创建一个 small live image并使用它。

使用 Linux From Scratch (LFS)并仅使用基本软件构建系统


这是最难的,你会花很多时间。

但是您将能够拥有一个非常小的发行版并了解 Linux 系统的真正工作原理。了解一切是如何工作的,您可以在设置中安装所需的内容,并使用更轻的二进制文件,如 Busybox .

有一个名为 Debian From Scratch 的旧项目(最后一次更新是从 2006 年开始,所以我不知道它是否可靠)旨在执行与 LFS 相同的操作,但使用 Debian。

(...) is a unique distribution that allows you to install a Debian system with almost the same level of control as what you would get with a Linux From Scratch installation but with the Debian advantages (easy to update and maintain).

您只需要一个该死的 Small Linux 开箱即用的解决方案


嗯,你可以试试Damn Small Linux ,它只有 50mb 并且基于 Debian,我相信它是最著名的最小发行版 (you can check more distros in this list)。我只是不知道它在 Web 服务器开发场景中的表现如何。

最终建议


对于上述所有情况,配置后,将您的虚拟机保存为默认虚拟机以备将来使用。或者更好的是,使用快照,每个快照与您的安装可能存在细微差别(请注意,控制太多快照可能有点麻烦)。

“我不想自己配置”


如果由于某种原因您不喜欢我的方法或没有太多时间听从我的建议(“创建自己的虚拟机”),您可以查看 this question on ServerFault .有一个来自不同发行版的一系列设备的列表。

...但是,如果您要测试其中的一堆,看看它们是否符合您的需求,为什么不花时间与它们一起创建您自己的呢?

锦上添花:使用 Vagrant管理您的虚拟机。


Vagrant is a tool for building and distributing virtualized development environments.

By providing automated creation and provisioning of virtual machines using Oracle’s VirtualBox, Vagrant provides the tools to create and configure lightweight, reproducible, and portable virtual environments.

这意味着 Vagrant 可以帮助您将创建新 VM 时通常做的很多事情自动化(这些功能来自官方网站):

  • 使用 Oracle 的 VirtualBox 自动创建虚拟机
  • 使用 Chef、Puppet 或仅使用 shell 脚本自动配置虚拟环境!
  • 对已创建环境的完全 SSH 访问权限
  • 为您的虚拟机分配一个静态 IP,可从您的机器访问
  • 将端口转发到主机
  • 共享文件夹让您可以继续使用自己的编辑器
  • 将环境打包到可分发的盒子中
  • 完成后彻底拆除环境
  • 使用单个命令轻松重建完整的环境

我会创建一个与我的生产服务器具有相同配置(嗯,几乎相同)的虚拟机,因此在部署时不会出现一些平台问题。

关于php - 为 Web 开发人员预装 Linux?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2154457/

相关文章:

linux - GNU less 的 bash 循环每 2 分钟刷新一次

php - 使用关系数据库来存储面对面游戏的结果

python - 使用 Python 的 sys.argv 将函数结果返回到命令行?

php - Gearman 的工作和任务有什么区别?

linux - 依赖性问题 - 未配置

docker - 在Docker容器的镜像构建上设置值

琐碎应用程序的窗口?

php - 本地主机+暂存+生产环境?

php - 连接mysql超时

php - 如何在 PHP 和 MySQL 中使用任意字符从表中搜索