ubunu 14 ex t2.micro php 7 , mysql 5.7, apache 2

system ownership and permissions

sudo adduser magento_user
sudo passwd magento_user

ps aux | grep apache

www-data  1439  0.0  1.3 359772 14052 ?        S    Feb06   0:00 /usr/sbin/apache2 -k start
www-data  1441  0.0  1.8 364188 19192 ?        S    Feb06   0:00 /usr/sbin/apache2 -k start
www-data  1442  0.0  1.4 361988 15164 ?        S    Feb06   0:00 /usr/sbin/apache2 -k start
www-data  1443  0.0  1.4 361988 15024 ?        S    Feb06   0:00 /usr/sbin/apache2 -k start

www-data

sudo usermod -g www-data magento_user 
sudo groups magento_user 
 
magento_user : www-data
 
sudo service apache2 restart
 
cd /var/www/html
sudo mkdir magento2
sudo chown magento_user:www-data magento2
sudo chmod 770 magento2

sudo su magento_user
cd magento2 

Maybe doing it with ubuntu user is faster (sudo usermod -a -G www-data ubuntu) ** DL file unzip or other method **

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

may need 777 var app/etc pub

Install

CLI

configure as needed

bin/magento setup:install --base-url=http://hostname/ \
--db-host=localhost --db-name=magento --db-user=your-user--db-password=your-pass \
--admin-firstname=Magento --admin-lastname=User --admin-email=email@some.com \
--admin-user=admin --admin-password=your-pass --language=en_US \
--currency=USD --timezone=America/Chicago --use-rewrites=1

Setup Wizard

follow instructions

after install

admin 404 or not css front?

verify admin route bash bin/magento info:adminuri

add static content, upgrade & recompile

bin/magento setup:static-content:deploy
bin/magento setup:upgrade
bin/magento setup:di:compile

may need to delete contents at var/ (prob cache) verify at incognito

for dev mode (less cache) at .htaccess uncomment. SetEnv MAGE_MODE developer

sudo service apache2 restart

Demo Data

sudo su magento_user

composer config repositories.magento composer https://repo.magento.com

credentials from magento site & git api key

bin/magento sampledata:deploy

bin/magento setup:upgrade


Rolando Lucio

My Personal Blog!