I’m sharing with you this post ,which guide you how to install Magento on Ubuntu 16.x.
Magento 2 of Community Edition (CE) is a free, open-source e-commerce platform.
Before You Start:
#Install and configure LAMP
#Install and configure Composer
#Validate current configuration as per magento System Requirements
My dev machine Configuration are :
Linux Ubuntu 16.10.x
Php 7.0.x
Mysql 5.0.12.x
Composer 1.4.x
Install via GitHub
First we must clone Magento repo from here: https://github.com/magento/magento2 or you can download releases on https://github.com/magento/magento2/releases
Create empty directory and run:
git clone https://github.com/magento/magento2.git
After deploying has been finished, run:
composer install
Update Write permission:
Below directory should be writable,
generated, var, pub
# Way 1 Sudo chmod g+wrx generated var pub # Way 2 Sudo chmod -fR 777 generated var pub
Install Magento 2 : My setup configuration was looks like this:
cd <magento-root-path>/bin ./magento setup:install --base-url="http://local.mage2.com/" --admin-firstname="dev" --admin-lastname="admin" --admin-email="your@email.com" --admin-user="devadmin" --admin-password="password1" --db-name="magento2" --db-host="localhost" --db-user="root" --db-password="root" #Output: [SUCCESS]: Magento installation complete. [SUCCESS]: Magento Admin URI: /admin_4y8ya6
Change your base-url, db-name, db-password, admin-email, admin-password to match your local setup.
Update VirtualHost Configuration :
Open the apache2.conf file and AllowOverride all for Directory permission.
#Add <Directory /var/www/> Options Indexes FollowSymLinks AllowOverride all Require all granted </Directory> #Like below : <VirtualHost *:80> ServerAdmin admin@local.mage2.com ServerName local.mage2.com ServerAlias www.local.mage2.com DocumentRoot /var/www/html/magento2 ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined <Directory /var/www/html/magento2/> Options Indexes FollowSymLinks AllowOverride all Require all granted </Directory> </VirtualHost>
Enable Debug and error :
Open index.php and add below code on top :
ini_set('display_errors', 1);
REINDEX DATA:
cd <magento-root-path>/bin ./magento indexer:reindex
More About Re-index Data : Click here
Final View: