A vagrant Ubuntu Server 32bit 14.04 LTS with Apache, MySQl, PHP and several development tools installed.

The server contains the following components:

  • apache
  • mysql
  • php 5.5
  • sqlite
  • vim
  • git
  • composer
  • nodejs, npm
  • cUrl
  • xdebug

The result can be used here: https://atlas.hashicorp.com/alexwenzel/boxes/webdev

Prepare the server

Initzialize vagrant:

vagrant init ubuntu/trusty32

Edit the initial vagrant file:

# -*- mode: ruby -*-
# vi: set ft=ruby :

# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|

  config.vm.box = "ubuntu/trusty32"

  config.vm.network "private_network", ip: ""
  config.vm.synced_folder "./www", "/var/www"
  config.vm.provider "virtualbox" do |vb|
    vb.memory = 2048

Then create the “www” folder and start vagrant:

vagrant up

SSH into the new vagrant box:

login as: vagrant
vagrant@'s password: vagrant

A quick ubuntu update:

sudo su
apt-get update
apt-get upgrade -y

Apache Webserver:

apt-get install apache2 -y
# add a server name
ServerName webdev

# modify directory configuration
<Directory /var/www/>
  Options Indexes FollowSymLinks
  AllowOverride All
  Require all granted


PHP, MySQL, SQLite, PHP cUrl, Git:

apt-get install php5 libapache2-mod-php5 mysql-server php5-mysql php5-sqlite php5-curl git -y

NodeJs, npm:

curl -sL https://deb.nodesource.com/setup | sudo bash -
apt-get install nodejs -y


curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer


apt-get install php5-xdebug

xdebug.profiler_enable_trigger = 1
xdebug.profiler_enable = 0
xdebug.profiler_output_dir = /var/www/xdebug/


Create vagrant box file

vagrant package --base <virtual_maschine_name> --output mybox.box

Test the box:

$ vagrant box add my-box /path/to/the/new.box
$ vagrant init my-box
$ vagrant up