During an AMA on Reddit, I was asked for some thoughts on Magento 2 - which did get me curious about just exactly what was required for Magento 2 to run on MageStack.
Historically, its worked out of the box, with nothing special required, so its interesting to see what the latest release requires.
Changing MageStack to Magento 2 mode
The only change required is that the stack defaults are changed from M1 to M2, so I quickly edited the vhost template to reflect the new release (customers should ask for this change),
Then that's it. The stack is now M2 ready, so on to the installation.
Installing Magento 2
www-data, change directory to the vhost for install,
mda we can grab the version we want to install with ease,
wget -O mda.phar --no-check-certificate https://raw.githubusercontent.com/sonassi/magento-download-archive/master/bin/mda.phar php mda.phar
Then pick your release, I'm installing
Then finally I'm selecting the build with sample data,
: Magento Community Edition 2.1.7 with Sample Data.tar.gz
Once the archive has downloaded, extract it,
mv downloads/Magento-CE* . tar xvfz Magento-CE*
Magento 2 will throw an error message if
/tmp/session is missing, so create this,
Then start the installer via command line (I've already created a DB and user),
php-7.0 bin/magento setup:install \ --db-host=db1.i \ --db-name=example_m2 \ --db-user=example_m2 \ --db-password=x \ --admin-user=admin \ --admin-password=x \ --email@example.com \ --admin-firstname=Sonassi \ --admin-lastname=Sonassi \ --base-url=http://www.example.com/
After a few seconds, Magento is installed and that's pretty much it.