Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
# First, Install Vagrant and Virtualbox then:
# Create new project directory
mkdir -p ~/Sites/newproject # Create new project directory
mk ~/Sites/newproject # Go into your new project directory
# Setup Vagrant
vagrant init
# Edit vagrant file box and box url to install Ubuntu, just like
# Edit Vagrantfile to create a static IP address, just like
# Edit Vagrantfile to share webserver's folder with your computer's folder, just like
# Save those changes, then...
vagrant up # Start your new server
vagrant ssh # Get into your new server to run commands in it
# Install LAMP stack - Apache, MySQL, PHP
# as per and/or
sudo apt-get update # Update package repositories
sudo apt-get install -y git-core wget vim curl build-essential python-software-properties # Install basics
sudo add-apt-repository -y ppa:ondrej/php5 # Add repository for php5.5 and Apache 2.4
sudo apt-get update # Update package repositories again after adding repository
sudo apt-get install -y php5 php5-mcrypt php5-gd php5-curl php5-mysql # Install PHP and common modules
sudo apt-get install -y apache2 libapache2-mod-php5 # Install Apache2
sudo apt-get install -y mysql-server # Install MySQL
# Finally view your new webserver at!
# Any files you add to ~/Sites/newproject will be available in your web server at
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment