2

I'm doing some side work for a startup that's using Amazon EC2 - they have a Windows server configured in the cloud that needs to run some Windows-only software, however their main offering is a web application that's based on PHP; I want to configure a Linux virtual machine so I don't have to deal with any oddness in using WAMP on the Windows box (also to use things like cron which don't work on Windows). While I've dabbled with servers I'm new to this whole virtualization thing.

What would be the quickest way for me to get up and running with this? I don't have a budget to buy software for this project so I need to use free tools; can I download something like VirtualBox and configure the Linux server via that? Is there anything weird I should know about setting up the virtual server so it can be accessed via the internet like a totally different server, or is it the same as with a "real" server?

4 Answers 4

4

The simplest, easiest, most totally laziest way to get a Linux VM up and runnning with a load of services installed, and configured is... to download one already done for you.

Install VMWare on your host (VMware server 2 is good and free), then grab a pre-packaged VM guest from the VMWare Appliances site. Copy the VM files to the host, tell the VMware console where you copied them to, then click the 'run' button.

There's a quite a few web VMs on there, you'll have a lot of choice.

2

If you have acces to the bare metal box I'd recommend ESXi (VMWare, Free) and put Windows in one host and Linux in the other. This will give you the best performance.

If you only have access to the Windows OS, but you can install software on it, then you'll want to use VMWare Server 2.0 (VMWare, Free) It will run as a windows service and your linux OS can run in it. Performance won't be as good, but this is your only option if you don't have access to the bare metal.

Other options are Virtual PC (Microsoft, Free), but is not a service. Virtual Server (Mircosoft, Free), runs as a service, but I liked VMWare Server 2.0 better. There is also Sun's virtual box (Free), but its less mature then either of these.

VMWare's game is virtualization so that's why I'd stick with them for production. For now anyway.

Once you setup the Virtual server OS, setup your remote access as you normally would (there is a console window you can use for the install). Then just access it like any other server.

3
  • no love for Citrix XenServer (also free)?
    – Rob Allen
    Jun 24, 2009 at 13:40
  • I don't have bare metal access unfortunately, since we're running on Amazon EC2 - the server already runs Windows Server 2003 R2 Datacenter. Jun 24, 2009 at 13:56
  • Should have added my list in by no means all inclusive. Those are what I've played with. Jun 24, 2009 at 13:58
1

As LEAT mentioned VMWare provides a stable virtualization platform. The quickist way is to simply (once VMWare is installed) create a new VMWare PC and install the system onto that the same way you would a brand new computer, and then install the software on top of that. If you know that you're going to be running this same virtual machine on the same hardware at a later date (say in a company that has standard laptops) then go ahead and make an image of the virtual machine when you're done to save time for next time.

Regarding your networking question you can either have the virtual machine take control of a network interface (only a good option if you've got multiple network interfaces) or you can NAT to a virtual IP for the virtual machine (I'm pretty sure VMWare sets this up for you).

While networking works great using virtual machines you should watch out for USB and serial ports. USB ports can be funny with certain devices and serial ports can be a huge pain. If your server doesn't need to access any of that, and it sounds like you don't, you shouldn't have a problem.

Good luck!

edit: These are links to the free VMWare products.

Server

ESXi: https://www.vmware.com/tryvmware/index.php?p=free-esxi&lp=1

1

I would choose VmWare for this and OpenBSD as the operating system, here are some hints about making the apache/php/ mysql stack, you should be done quickly :):
Installing mysql;

# pkg_add ftp://your_mirror_here/pub/OpenBSD/4.5/packages/i386/mysql-server-5.0.77.tgz
# mysqld_safe &
# mysql_install_db
# mysql_secure_installation

Add this to your /etc/rc.local to start mysql with a link to the socket into the chroot of apache:

if [ -x /usr/local/bin/mysqld_safe ]; then
rm -R /var/www/var/run/mysql
mkdir -p /var/www/var/run/mysql
chown _mysql:_mysql /var/www/var/run/mysql
/usr/local/bin/mysqld_safe --user=_mysql &
sleep 10
ln -f /var/run/mysql/mysql.sock /var/www/var/run/mysql/mysql.sock
fi

You can then install php support:

# pkg_add ftp://your_mirror_here/pub/OpenBSD/4.5/packages/i386/php5-core-5.2.8p0.tgz
# ln -s /var/www/conf/modules.sample/php5.conf \
/var/www/conf/modules

Next edit the /etc/rc.conf and change httpd flags to make it start at boot and if i forget nothing you're pretty ready.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .