Skip to content

Instantly share code, notes, and snippets.

@davidalger
Created November 19, 2015 17:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidalger/496044cf1636dd4145fb to your computer and use it in GitHub Desktop.
Save davidalger/496044cf1636dd4145fb to your computer and use it in GitHub Desktop.
Install M2 for contribution work
#!/usr/bin/env bash
mkdir -p /server/sites/m2.dev
cd /server/sites/m2.dev
git clone git@github.com:magento/magento2.git ./ && git checkout 2.0.0
composer install --no-interaction --prefer-dist
mysql -e 'create database m2_dev'
bin/magento setup:install --base-url=http://m2.dev --backend-frontname=backend \
--admin-user=admin --admin-firstname=Admin --admin-lastname=Admin \
--admin-email=user@example.com --admin-password=A123456 \
--db-host=dev-db --db-user=root --db-name=m2_dev
mkdir -p /server/sites/m2.dev/var/.m2-data && pushd /server/sites/m2.dev/var/.m2-data
git clone git@github.com:magento/magento2-sample-data.git ./ && git checkout 2.0.0 && popd
php -f /server/sites/m2.dev/var/.m2-data/dev/tools/build-sample-data.php -- --ce-source=/server/sites/m2.dev
bin/magento setup:upgrade
bin/magento cache:flush
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment