/magento2-and-nginx-install

Script to install Nginx and Magento 2 and a lot of dependencies on Ubuntu 16.04/18.04

Primary LanguageShell

magento2-and-nginx-install

This makes it really simple to setup a Nginx Environment with php7.2 and MySQL and also installs Magento 2. You will have it all setup with only one click - Have fun!

1. First go to /m2files/magento2 and change the paths to the name of the site that you will use.

Exs:
server_name mysitemagento2.test;
set $MAGE_ROOT /var/www/html/mysitemagento2.test;
include /var/www/html/mysitemagento2.test/nginx.conf.sample;

2. Go to the bootstrap.sh and define the setup infos as you want:
(just remember to use for magentourl and magentourlnohttp the same name you chose on step 1)
dbname=magento2
dbpass=yourpasswordhere
magentourl=http://mysitemagento2.test
magentourlnohttp=mysitemagento2.test
magentoadminname=admin
magentoadminlastname=admin
magentoadminpassword=yourpassword
backendfrontname=admin
adminemail=admin@admin.com
adminuser=admin
language=en_US
currency=EUR #currency - USD, EUR, BRL etc
timezone=Europe/Madrid
################################################
############ End of Initital setup ############
################################################

3. Go to /m2files/auth.json and add your magento keys.
If you don't have it, there is a tutorial on how to get it here.

4. Make the bootstrap.sh writeable:
sudo chmod 777 bootstrap.sh

5. Run the bootstrap.sh:
./bootstrap.sh

After finishing the code, go to /etc/hosts and make sure the name you chose to the website is there like:
127.0.0.1 mysitemagento2.test