php 在 Windows XP 上创建虚拟 LAMP 机器的最简单方法?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/488561/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-24 22:54:12  来源:igfitidea点击:

Easiest way to create a virtual LAMP machine on Windows XP?

phpmysqllinuxapachevirtual-machine

提问by Yes - that Jake.

I need to set up a test environment on my XPSP3 machine that runs Apache, MySQL, and PHP. My original test environment was an old box that ran those three under Win2k. That box died. Running on Windows was never optimal because the ultimate hosting environment is CentOS Linux.

我需要在运行 Apache、MySQL 和 PHP 的 XPSP3 机器上设置一个测试环境。我原来的测试环境是一个旧机器,它在 Win2k 下运行这三个。那个盒子死了。在 Windows 上运行从来都不是最佳的,因为最终的托管环境是 CentOS Linux。

What is the most straightforward way to set up a virtual machine on XP these days? I don't want to spend all my time tinkering with the test environment when I could be coding.

现在在 XP 上设置虚拟机最直接的方法是什么?当我可以编码时,我不想把所有时间都花在修改测试环境上。

As a follow-up question, how important is it to use the same distro on my test environment as my deployment? I don't know CentOS at all, but I'm comfortable with Fedora or Ubuntu.

作为后续问题,在我的测试环境中使用与部署相同的发行版有多重要?我根本不懂 CentOS,但我对 Fedora 或 Ubuntu 很满意。

回答by j pimmel

Download free VMWare playerand install one of the pre-made Open Source LAMP VMs from the VMWare appliance marketplace. VMs are also available in many places other than the appliance marketplace.

VMWare 设备市场下载免费的VMWare 播放器并安装其中一个预制的开源 LAMP VM 。VM 也可用于除设备市场以外的许多地方。

回答by ankushnarula

VM's are great - I love them. But if you're in a real hurry to get started, take a look at WAMPserver for Windows: http://www.wampserver.com/en/

VM 很棒 - 我喜欢它们。但是,如果您真的急于开始,请查看 Windows 版 WAMPserver:http://www.wampserver.com/en/

回答by frankadelic

VMWare requires you to submit your contact information to download VMWare server.

VMWare 要求您提交联系信息以下载 VMWare 服务器。

Sun's VirtualBoxgets the job done and you can just download the application without registration or hassles. Set it up with "Host Networking" and you'll be able to connect to the LAMP instance via SSH with its own IP address in your LAN.

Sun 的 VirtualBox可以完成工作,您只需下载应用程序,无需注册或麻烦。使用“主机网络”进行设置,您将能够通过 SSH 连接到 LAMP 实例,并在您的 LAN 中使用它自己的 IP 地址。

Click here to download pre-built Virtual Box images, akin to VMWare virtual appliances.

单击此处下载预构建的 Virtual Box 映像,类似于 VMWare 虚拟设备。

回答by brutuscat

I think the fastest and easy way is with VirtualBox and a Ubuntu Server image:

我认为最快和最简单的方法是使用 VirtualBox 和 Ubuntu Server 映像:

  1. Get VirtualBox from http://www.virtualbox.org/wiki/Downloads
  2. Get the Ubuntu server image http://downloads.sourceforge.net/virtualboximage/ubuntu-8.10-server-x86.7z(LAMP server isntalled, MySQL root password is toor)
  3. Extract the image somewhere
  4. Install VirtualBox
  5. Open VirtualBox, go to File > Virtual Media Manager
  6. Click on the Add button and go to the path where you extracted the image, select it and click ok. (you've created a hard disk image)
  7. Now on the main window of VB click New to create a new machine. Next
  8. Set a name for it and set "Operating System -> "Other" and "Verison" -> "Other/Unknown". Next
  9. Set base memory at least to 256mb. Next
  10. Now select the hd image you've already created. Next
  11. Finish. Now go to the newly created VM, right-click and select "Settings"
  12. In the General options click the Advanced tab and select Enable PAE/NX and VT-x/AMD-V (if your CPU supports it). Click Ok
  13. You can now Select and Start your VM
  14. Login with ubuntu:reverse
  1. http://www.virtualbox.org/wiki/Downloads获取 VirtualBox
  2. 获取 Ubuntu 服务器镜像http://downloads.sourceforge.net/virtualboximage/ubuntu-8.10-server-x86.7z(LAMP server is nottalled, MySQL root password is toor)
  3. 在某处提取图像
  4. 安装 VirtualBox
  5. 打开 VirtualBox,转到文件 > 虚拟媒体管理器
  6. 单击“添加”按钮并转到提取图像的路径,选择它并单击“确定”。(您已经创建了一个硬盘映像)
  7. 现在在 VB 的主窗口上单击 New 创建一个新机器。下一个
  8. 为其设置一个名称并设置“操作系统->“其他”和“版本”->“其他/未知”。
  9. 将基本内存至少设置为 256mb。下一个
  10. 现在选择您已经创建的高清图像。下一个
  11. 结束。现在转到新创建的虚拟机,右键单击并选择“设置”
  12. 在常规选项中单击高级选项卡并选择启用 PAE/NX 和 VT-x/AMD-V(如果您的 CPU 支持)。单击确定
  13. 您现在可以选择并启动您的虚拟机
  14. 使用ubuntu登录:反向

Now you have a LAMP Server ;) Info here Ubuntu Server Guide

现在你有一个 LAMP 服务器 ;) 信息在这里Ubuntu 服务器指南



Credits to:

归功于:

回答by Ates Goral

Try one of these VMWare LAMP appliances or Google "vmware lamp" for more:

尝试这些 VMWare LAMP 设备之一或谷歌“vmware灯”了解更多信息:

回答by Ates Goral

www.xampp.org

www.xampp.org

thats whats up

这是怎么回事

回答by rmeador

I was pretty sure that the CentOS site had a VM available for download the last time I went there looking for ISOs, but I can't find it now... maybe I have it confused with something else. Regardless, acquiring CentOS ISOs is easy enough, and you can just install them into a VM. Or, as others have said, you can check out the VM marketplace. I think this onemight be just what you need, but I didn't look very hard.

上次我去那里寻找 ISO 时,我很确定 CentOS 站点有一个可供下载的 VM,但我现在找不到了……也许我把它与其他东西混淆了。无论如何,获取 CentOS ISO 很容易,您只需将它们安装到 VM 中即可。或者,正如其他人所说,您可以查看 VM 市场。我认为可能正是您所需要的,但我看起来并不是很努力。

回答by Marko

All this Wamps and Xaamps are not necessary. The best way to use LAMP on Windows is by manually installing it. This way you are in control and you will also learn a lot. It is very simple so here's my howto on this topic:

所有这些 Wamps 和 Xaamps 都不是必需的。在 Windows 上使用 LAMP 的最佳方法是手动安装它。这样你就可以控制,你也会学到很多东西。这很简单,所以这是我关于这个主题的方法:

LAMP on Windows

Windows 上的灯

回答by Andrew Rollings

Use a free version of VMWare Serveror their VM Playerwith the free LAMP stack virtual appliance(a preconfigured VM)

将免费版本的VMWare Server或其VM Player与免费的LAMP 堆栈虚拟设备(预配置的 VM)一起使用

回答by Hermooz

Other have already pointed you towards VMware's virtual appliance store, so I'll just reply to your other question: if you are comfortable with Fedora you should cope quite well with CentOS, since both distros are RedHat-based. And for this reason I'll suggest you to use exactly the same distro you'll use in production; difference between distros usually are minimal but could bite sometimes.

其他人已经向您指出 VMware 的虚拟设备商店,所以我只回答您的另一个问题:如果您对 Fedora 感到满意,那么您应该能很好地处理 CentOS,因为这两个发行版都是基于 RedHat 的。出于这个原因,我建议您使用与生产中使用的完全相同的发行版;发行版之间的差异通常很小,但有时会咬人。

bye!

再见!