Vagrant configuration to run Magento 2
This Vagrant configuration sets up required environment and installs latest available Magento 2 running on Ubuntu 14.04.3 LTS (Trusty Tahr). Brought to you by aheadWorks.
- Ubuntu 14.04.3 LTS (Trusty Tahr)
- Apache 2.4 with mods enabled
- Mysql 5.6
- PHP 5.5.9 with all extensions required by Magento2
Preparing your installation
- Install VirtualBox
- Install Vagrant
- Install vagrant-puppet-install plugin by executing
vagrant plugin install vagrant-puppet-install
- Download/clone this repository and cd to it's root
Configure varables inside Vagrantfile like: port, hostname, docroot, etc. This step is optional.
Since Nov 2015 Magento requires key-based authentication to be installed.
Obtain GitHub token and put it in Vagrantfile's github_token variable.
Generate public and private keys with Magento Connect and put it in magento_pubkey and magento_privkey variables inside Vagrantfile
Push the temple
vagrant upand give it some time to install all the stuff for you. This will automatically download and configure box and install all required software
- Edit your hosts file(/etc/hosts on OSX/Linux, Windows\System32\Drivers\etc\hosts on Windows) and add line
127.0.0.1 magento2.dev. If you changed hostname at Vagrantfile be sure to replace magento2.dev with it
- When Vagrant will complete the installation, open http://magento2.dev:7654 in your browser
- Report of any issues if something goes wrong during installation
vagrant provisionif you change something in Vagrant/Puppet configuration
vagrant reloadto reboot your box
vagrant destroyto remove box completely
vagrant sshto start SSH session
vagrant plugin install vagrant-puppet-installfails to run, just re-run it one more time, it is a known issue for some Vagrant plugins.