Skip to content

lmammino/dev.el

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dev.el logo

Dev.el allows you to easily setup a vagrant virtual box virtual machine to ease the development of php applications.

Once ran it will automatically provides you a complete environment comprising:

  • Ubuntu 12 (64bit quantal)
  • PHP Latest stable from ppa ~ondrej/php (with pear, dev, curl, mcrypt, intl, apc and gd)
  • A suite of common php tools (composer, boris, phpunit)
  • Mysql 5.5 (percona)
  • phpMyAdmin
  • Nginx

Setup

Start by fetching the project in a directory of your choice through git:

 git clone git@github.com:lmammino/dev.el.git

Then you'll need to add the following 2 entries on your hosts file (/etc/hosts on mac and linux, %SystemRoot%\system32\drivers\etc\hosts on Windows):

33.33.33.101	dev.el

This way you will be able to access the webserver on your vm through the url http://dev.el and http://dev.el/phpmyadmin to access phpMyAdmin (user/pass: root/root).

Ok, now you have a vagrant project on the hand, so if you already know ho to use vagrant you are just a vagrant up away to start. If you don't know vagrant keep reading the next paragraphs.

Using Vagrant

Download a 1.x version (v1.1.4 suggested) from the official website.

  1. Requisites

  1. Install vagrant runtimes

Visit vagrant official website and download the latest version for youir OS.

  1. Running the virtual machine

Once you've installed vagrant and dowloaded the files from this repository you should simply pick up your command line and run vagrant up (on the path where you cloned the repository) to run the virtual machine. Anyway before running vagrant up it would be good to enable the virtual box guest additions plugin with the command vagrant plugin install vagrant-vbguest.

  1. Destroying the virtual machine

Run vagrant destroy to shutdown the current running virtual machine and remove it from the disk.

  1. Suspending/resuming the virtual machine

Building the virtual machine with vagrant up is a slow operation, it takes about from 2 to 15 minutes, depending on your cpu and ram. So it's highly suggested to not destroy it completely every time. It's better to suspend (vagrant suspend) and then resume it (vagrant resume or vagrant up).

  1. SSH Access

You're in full control of your virtual machine. You can easily obtain a complete ssh access through the command vagrant ssh.

  1. Using the VM

The VM is preconfigured to create a local network between your PC and the VM instance. The VM will use the ip 33.33.33.101. So, when the vm successfully started, you can go to http://33.33.33.101 to run the application (or jus http://dev.el if you tweaked your hosts files).

You can also access to phpMyAdmin using the url http://dev.el/phpmyadmin and user/pass root/root .

For further information about vagrant please read the official vagrant documentation.

That's all, enjoy developing with dev.el! ;)

About

The simple vagrant setup for PHP developers

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published