Monday, September 8, 2008

how to install an ubuntu development server in OS X 10.5 Leopard

This was actually pretty easy after i figured it out. :)

I'm using VMware Fusion. I went to the VMware Fusion website and downloaded the bittorrent file for a Ubuntu Hardy Server disk image. I needed to unzip it and it was in the 7zip format so I had to get EZ 7z to unzip it. I unzipped it into the Virtual Machines folder which is in the shared folder on my Mac. Once it was in there, I booted it and ran apt-get update and what not to get ubuntu up to date. If you want it to run a little faster, shutdown the image and open up the .vmx file in textmate or whatever editor you're into. Add this to the .vmx file:

vmi.present=TRUE
that enables paravirtualization which dramatically speeds up the machine.

Now, if you're like me, you're setting up a webserver and you're wondering how to get that going. You would also prefer to ssh to the machine, you'll be able to copy and paste into the command line that way. Open up the MacOs 'Network Utility" app. Click on the netstat tab there and you'll see a list of addresses. Look in the list for those with a vmnet netif, on mine it was 192.168.131.132. That's the IP address for your virtual machine. You can only access it locally. Open the terminal and ssh user@192.168.131.132... and presto, you're ready to install your stack. When you get a hello world, point firefox at http://192.168.131.132.

No comments: