Skip to content

Instantly share code, notes, and snippets.

@peterjaap
Last active September 21, 2023 14:24
Show Gist options
  • Select an option

  • Save peterjaap/80e21df2fd469295d9a271bb668302e4 to your computer and use it in GitHub Desktop.

Select an option

Save peterjaap/80e21df2fd469295d9a271bb668302e4 to your computer and use it in GitHub Desktop.
Quick Magento 2 install
#!/bin/bash
composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition magento2
cd magento2
DB_NAME=dbnamehere php bin/magento setup:install --base-url=http://elgentos.magento2.localhost/ --db-host=db --db-name=${DB_NAME} --db-user=peterjaap --admin-firstname=PJ --admin-lastname=Blaakmeer --admin-email=peterjaap@elgentos.nl --admin-user=peterjaap --admin-password=peterjaap123 --language=en_US --currency=EUR --timezone=Europe/Amsterdam --use-rewrites=1 --backend-frontname=admin --amqp-host=rabbitmq --amqp-port=5672 --amqp-user=guest --amqp-password=guest --amqp-virtualhost="/" --search-engine=elasticsearch7 --elasticsearch-host=elasticsearch7 --elasticsearch-port=9200 --elasticsearch-enable-auth=0 --elasticsearch-index-prefix=magento2_${DB_NAME} --elasticsearch-timeout=15 --use-sample-data
php bin/magento deploy:mode:set developer
# Possibly sampledata - get keys at https://marketplace.magento.com/customer/accessKeys/
php bin/magento sampledata:deploy # this will probably fail due to memory limit, just run `composer update` after it fails
composer require markshust/magento2-module-disabletwofactorauth
# Run setup:upgrade
php bin/magento s:up
# Disable 2FA
bin/magento config:set twofactorauth/general/enable 0
@henkvalk

Copy link
Copy Markdown

typo on line 3 magento2 instead of magento

@peterjaap

Copy link
Copy Markdown
Author

@henkvalk 👍 fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment