views:

3342

answers:

9

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.

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.

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.

+1  A: 

www.xampp.org

thats whats up

i'll vote this up because I use xampp. Why vote it down, anyway? It is the EASIEST way, maybe not the best though.
BBetances
Part of the question was "What is the most straightforward way to set up a virtual machine on XP these days?" xampp may rock, but it surely cannot be called a virtual machine.
innaM
+14  A: 

Download free VMWare player and 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.

j pimmel
+2  A: 

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

Ates Goral
+1  A: 

Use a free version of VMWare Server or their VM Player with the free LAMP stack virtual appliance (a preconfigured VM)

Andrew Rollings
+1  A: 

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 one might be just what you need, but I didn't look very hard.

rmeador
+9  A: 

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/

ankushnarula
I don't think this works for me. I need IIS on port 80 of my dev machine for other projects and Apache on port 80 for this one. (I still upvoted. It was a good suggestion.)
Jekke
You could still add another IP address to your machine, and just bind apache to that
Tom Haigh
Yes... tomhaigh is absolutely right. Assuming you have the ability to add multiple IP addresses.
ankushnarula
+5  A: 

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

Sun's VirtualBox gets 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.

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

frankadelic
+1  A: 

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.

bye!

Hermooz
+1  A: 

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

  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

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


Credits to:

BrutusCat