Skip to content

Instantly share code, notes, and snippets.

@petemcw
Last active February 20, 2024 09:59
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save petemcw/d89c57a94e39f9dc2c01 to your computer and use it in GitHub Desktop.
Save petemcw/d89c57a94e39f9dc2c01 to your computer and use it in GitHub Desktop.
Install Magento 2.0

Install Magento 2.0

Download the software

composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition <install_dir>
cd <install_dir>

Web server Permissions

chown -R :www-data .
find . -type d -exec chmod 770 {} \; && find . -type f -exec chmod 660 {} \; && chmod u+x bin/magento

Install software

Note: make sure your database user has the following permissions SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER

./bin/magento setup:install \
    --base-url=http://example.com/ \
    --backend-frontname=manage \
    --use-rewrites=1 \
    --use-secure=0 \
    --db-host=localhost \
    --db-name=magento_exercises \
    --db-user=magento_user \
    --db-password=secret \
    --admin-firstname=August \
    --admin-lastname=Ash \
    --admin-email=test@augustash.com \
    --admin-user=admin \
    --admin-password=admin123 \
    --language=en_US \
    --currency=USD \
    --timezone=America/Chicago

Enable developer mode

./bin/magento deploy:mode:set developer

Sample data

./bin/magento sampledata:deploy
composer update
./bin/magento setup:upgrade
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment