Additionally to my fully functional development environment described here, I want to have some more programs.

For example

  • vim
  • composer (global install)
  • php sqlite support

To have these installed automatically, I create a file in the same directory like the Vagrantfile.

Here is the content:

#!/usr/bin/env bash

apt-get install vim --yes
apt-get install php5-sqlite --yes
service apache2 restart
curl -sS | php
mv composer.phar /usr/local/bin/composer

Then I open the Vagrantfile to add the excecution.

config.vm.provision :shell, path: ""

In combination with my default setup, my Vagrantfile looks like this:


Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| = "avenuefactory/lamp" "private_network", ip: ""
  config.vm.synced_folder "./html", "/var/www/html"
  config.vm.provision :shell, path: ""

Here are more information about provisioning: