The biggest impediment that I faced while learning to develop on Magento 2 is to setup a development environment that is not slow as a snail. After a lot of experiments I ended up selecting Bitnami’s virtual machine for Magento 2. It is the fastest of the available solutions that I have found so far.
First you have to download the virtual machine from the Bitnami website. You can download the virtual machine from this page http://bit.ly/2rQrqvo. Before you install the virtual machine you have to have Virtual Box installed in your system. Download Virtual Box from http://virtualbox.org and install before you go on to import the virtual machine. After virtual box is available on your system, double click the downloaded virtual machine appliance (bitnami-magento-2.1.6-2-linux-ubuntu-14.04-x86_64.ova) and follow the instruction on screen to add the virtual machine to your virtual box application.
After the virtual machine is imported, you should see the newly imported virtual machine on the available virtual machines list at the left side-bar. Select the machine and click the start button on top menu to start the machine.
At the beginning its going to take some time to initialize the machine. Once initialization is finished you will be asked to give the ubuntu username and password. For bitnami stack of magento 2 the username is bitnami and the password is also bitnami.
Once logged in you will be show the IP address where the virtual box is running from. For me the address was 192.168.1.108. Enter the IP on any one of you browser and you should see the magento 2 home page. To access admin panel you have to goto http://192.168.1.108/admin with username as user and password as bitnami1.
To enable ssh access use following code to activate ssh config and start ssh server.
sudo mv /etc/init/ssh.conf.back /etc/init/ssh.conf sudo start ssh
It is possible to use virtual host instead of the IP address. Further detail on that will come in a followup post.
Add-on: Recent debian 8 version of the appliance does not work with this blog post.
To enable ssh on the debian 8 version do –
sudo rm -f /etc/ssh/sshd_not_to_be_run sudo systemctl enable ssh sudo systemctl start ssh