Skip to content

Instantly share code, notes, and snippets.

@devNoiseConsulting
Created February 24, 2017 01:44
Show Gist options
  • Save devNoiseConsulting/ea5e3eabf7fb8daf47441168a9f7bd90 to your computer and use it in GitHub Desktop.
Save devNoiseConsulting/ea5e3eabf7fb8daf47441168a9f7bd90 to your computer and use it in GitHub Desktop.
Commands to get Magento running on Ubuntu
#!/bin/bash -x
# This scripts assumes that you already have all the correct packages
# installed and configured the virtual host for Apache 2.x. Also
# assuming that you've added the magento cli to your $PATH.
cd ~/www/html/
# "Nuke It From Orbit" - I've screwed up my Magento install and couldn't
# seem to back out the change. So I gave up and started over.
# rm -fd ~/www/html/*
# tar xjf ~/Magento-CE-2.1.*.tar.bz2
find var vendor pub/static pub/media app/etc -type f -exec chmod g+w {} \;
find var vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} \;
chown -R :www-data .
chmod u+x bin/magento
magento setup:install \
--base-url=http://magento.example.com/ \
--admin-firstname="Magento" \
--admin-lastname="Admin" \
--admin-email="[email protected]" \
--admin-user="admin" \
--admin-password="password123!" \
--db-name="magento" \
--db-user="magento" \
--db-password="magento" \
--language=en_US \
--currency=USD \
--timezone=America/New_York \
--use-rewrites=1 \
--cleanup-database
# Some addition magento commands that might be helpful.
# magento deploy:mode:set developer
# magento cache:clean
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment