Make it very easy to setup a complete development stack (MySQL, PHP, NodeJS, etc) in a matter of minutes.
- VirtualBox http://www.virtualbox.com
- Vagrant http://www.vagrantup.com
- vagrant-hostmanager
vagrant plugin install vagrant-hostmanager
Download Vagrantfile to project_name_dir
and up server
$ cd project_name_dir
$ wget http://ilyar.github.io/localserver/Vagrantfile
$ vagrant up
The project is available at http://project_name_dir.local/
Note:
$ vagrant suspend # suspends the machine
$ vagrant halt # stops the vagrant machine
$ vagrant destroy -f # stops and deletes all traces of the vagrant machine
And like any other vagrant file you have SSH access with:
$ vagrant ssh
also can run once command:
$ ssh vagrant@localserver composer update
- PHP Remote Interpreters Support in PhpStorm 8 EAP
- How to Install Xdebug with PHPStorm and Vagrant read from
Configuring PHPStorm – Servers
- Working with Advanced Vagrant features in PhpStorm
- Ubuntu 14.04 LTS 32-bit (for use 64-bit set
VM_ARCH=64
) - Apache 2
- MySQL 5.5
- PHP 5.5 (with modules: apc, memcached, cli, curl, gd, imap, mysql, mcrypt, sqlite, xdebug, xsl, pear, intl, tidy, readline) and tools:
- phpmyadmin http://localserver/phpmyadmin/
- composer — Dependency Manager for PHP
- composer-asset-plugin — NPM/Bower Dependency Manager for Composer
- php-cs-fixer — PHP Coding Standards Fixer
- NodeJs (node, npm, bower)
We are using the base Ubuntu 14.04 box from Vagrant. If you don't already have it downloaded the Vagrantfile has been configured to do it for you. This only has to be done once for each account on your host computer.
The web root is located in the project directory and you can install your files there.
Externally the MySQL server is available at localserver:3306
, and when running on the VM it is available as a socket or at port 3306 as usual.
Username: root
Password: local
custom_project_name = false # default from project name folder
custom_project_host = false # default `project_name.local`
custom_project_alias = false # default `www.project_name.local`
custom_ip_address = false # default "10.0.0.10" IPv4 private network range
custom_default_host = false # default "localserver"
custom_vm_arch = false # default 32 or VM_ARCH
custom_vm_memory = false # default 512 or VM_MEMORY
custom_vm_cores = false # default 1 or VM_CORES