create and share a vagrant box

Info and upload:

https://atlas.hashicorp.com/help/vagrant/boxes/create

Pack a box with virtualbox

Avoid the generation of a ssh key!

Insert this into your Vagrantfile  during box creation

Remove an existing ssh key from a box

Update Virtualbox Guest Addition

http://kvz.io/blog/2013/01/16/vagrant-tip-keep-virtualbox-guest-additions-in-sync/

Use specific box version

https://www.vagrantup.com/docs/boxes/versioning.html

 

creating a vagrant base box from an existing base box

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:

Edit the initial vagrant file:

Then create the “www” folder and start vagrant:

SSH into the new vagrant box:

A quick ubuntu update:

Apache Webserver:

http://httpd.apache.org/docs/2.4/sections.html

PHP, MySQL, SQLite, PHP cUrl, Git:

NodeJs, npm:

Composer:

 xDebug:

https://alexwenzel.de/2014/191/php-profiling-xdebug

Create vagrant box file

Test the box:

Vagrant LAMP Stack setup

I liked WAMP very much, but after discovering Vagrant I never will go back to WAMP.

What is Vagrant used for?

Create and configure lightweight, reproducible, and portable development environments.

In my words: Vagrant is used to simulate a real server environment to interact with.

In this article I want to share my basic setup.

Continue reading Vagrant LAMP Stack setup