I made it. I’ve started my Magento video series where I am planning to share my knowledge about Magento 2. Please welcome my new Magento DevChannel Youtube channel.
It took me a year after I promised to start Video Blog back in January 2016 and actually made it in February 2017. In the first video, I show How to Install Magento 2 with Sample Data via Command Line. We go through a set of commands required to download, install and configure Magento 2 on a local environment.
As this is my first Magento tutorial video I am expecting feedback from you guys to adjust myself and the way I record the video for the future. Leave the comments below or email me. Enjoy watching.
You should have the following tools installed on your environment:
- PHP 5.6+, better to have PHP 7.0.x
- MySQL 5.6 or 5.7
Commands for installing Magento 2
Create new directory:
$ mkdir magento2
Create new Magento 2 Community Edition project using composer:
$ composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition magento2
Log in to a MySQL console as root:
$ mysql -u root
Create a new database:
$ create database magento2tutorial;
Create the new database user with permissions for magento2tutorial database:
$ GRANT ALL PRIVILEGES ON magento2tutorial.* To 'magento2'@'localhost' IDENTIFIED BY '123123q';
Exit from database console:
Change permissions for magento script:
$ chmod a+x bin/magento
Install Magento 2 via command line:
$ bin/magento setup:install --base-url=http://tutorial.magento2.dev --db-host=localhost --db-name=magento2tutorial --db-user=magento2 --db-password=123123q --admin-firstname=Magento --admin-lastname=User --email@example.com --admin-user=admin --admin-password=123123q --language=en_US --currency=USD --timezone=America/Chicago --use-rewrites=1
Open an Apache2 httpd-vhosts.conf file:
$ sudo vi /etc/apache2/extra/httpd-vhosts.conf
Add new virtual host:
ServerName tutorial.magento2.dev DocumentRoot "/Users/pronko/Sites/tutorials/magento2/pub" ErrorLog "/private/var/log/apache2/magento2-error_log" CustomLog "/private/var/log/apache2/magento2-access_log" common ServerAdmin firstname.lastname@example.org
Open hosts file:
$ sudo vi /etc/hosts
Add a new record with the custom domain name:
Restart Apache2 server:
$ sudo /usr/sbin/httpd -k restart
Install Magento 2 Sample Data using the
$ bin/magento sampledata:deploy
Create new Public/Private Key from www.magento.com website and enter it when CLI will request Username and Password.
Run upgrade command to install Sample Data:
$ bin/magento setup:upgrade
Subscribe to my Channel
If you like my first video go ahead and subscribe to my Magento DevChannel Youtube channel.
Max Pronko is an international Magento Expert, development consultant, motivational speaker and Magento award-winning developer. He is known for the educational development programs for organizations of all sizes and has positively affected thousands of people and organizations worldwide.
Subscribe to my Magento 2 tips and tutorials content.
Every week I send an interesting email directly to your inbox