Skip to content

Instantly share code, notes, and snippets.

@drawcard
Last active September 11, 2017 00:28
Show Gist options
  • Save drawcard/f21902e541fa90040850 to your computer and use it in GitHub Desktop.
Save drawcard/f21902e541fa90040850 to your computer and use it in GitHub Desktop.
Development Environment using a VM + VMWare Fusion

Installation

  • Download the Ubuntu Server ISO: http://www.ubuntu.com/download/server
  • Create a new container and install Ubuntu Server Don't use the Setup Wizard to do this, instead mount the ISO and use Ubuntu's setup process During the install process, also add the LAMP + OpenSSH + Samba modules when asked

(Mac) Create an Applescript to run VM as a headless server

More info: http://www.artandlogic.com/blog/2013/10/running-vmware-fusion-6-headless/

  • Open AppleScript and make a new script with the following code:
do shell script "sudo /Applications/'VMware Fusion.app'/Contents/Library/vmrun -T fusion start /Users/[username]/Documents/'Virtual Machines.localized'/'Ubuntu 64-bit.vmwarevm' nogui" with administrator privileges

(Replace [username] with the name of your Mac's user folder)

  • Save your file as an AppleScript Application: "Start Headless Server" and add a shortcut to your dock

  • Duplicate the Applescript and modify the code to:

do shell script "sudo /Applications/'VMware Fusion.app'/Contents/Library/vmrun -T fusion stop /Users/[username]/Documents/'Virtual Machines.localized'/'Ubuntu 64-bit.vmwarevm' soft" with administrator privileges

(Replace [username] with the name of your Mac's user folder)

  • Save your file as an AppleScript Application: "Stop Headless Server" and add a shortcut to your dock
  • Right click on the new AppleScript Applications, go to Get Info, and paste in a funky icon to help differentiate the scripts
  • Start the server and ssh into it using Terminal / iTerm2 using the credentials you set up during Ubuntu installation (you did write those details down, didn't you?)

Enviroment Setup

sudo usermod -d /var/www/ ftp

Install Software

Warning

Some commands may require "sudo" to be run or else they might fail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment