Sunday, 10 January 2016

thumbnail

How-to-install-and-configure-magento-2.0.0 in CentOS-6/Fedora21

Introduction


Magento is an opensource E-Commerce merchant software that you can use to build online show case of your own. It was founded by ebay. And it is available as Enterprise and Community edition.

In this tutorial we will see how to install and configure the magento.

You will need install and configure the LAMP server in order to install magento.

Check the below link to install the LAMP server.
1. How to install LAMP server

For CentOS-6.7 you need upgrade the php version to 5.6
If you want to upgrade then follow my last article and just a little bit changes is required to change 5.5 to 5.6

# To change upgrade php version click here

Note :- Just change php55w to php56w and follow the rest as it is.
Just follow install the php upgrade part in the above link. 

1. First of all we need to create a database :-

CREATE DATABASE magento2;
CREATE USER magento2@localhost IDENTIFIED BY 'magento2';
GRANT ALL ON magento2.* TO magento2@localhost;
FLUSH PRIVILEGES;
exit

2. Now go inside the directory and clone the magento2 :-

cd /var/www/html/
git clone https://github.com/magento/magento2-community-edition.git

3. Now install the composer as given below and make sure you have installed the curl packages :-


# yum install curl php-curl
# curl -sS https://getcomposer.org/installer | php
# mv composer.phar /usr/local/bin/composer
# chmod +x /usr/local/bin/composer

4. After that you to have create a account in magento website to get the secure key for the authentication of repo :-

4.1 After you have created your account login to your account.

Go to - My Account ( In top right corner)
Click on Connect
Click on Secure keys
Enter Name :- Sarfaraz ( Change as per your anything you can give)
Lastly Click Generate New


  
Keep this page open as we require it 

Public key :- It is your username. Copy the alpha numeric character and paste it in your username.

Private key :- It is your password. Copy the alpha numeric and paste it in password.

5. Now change the ownership and permission :-

chown -R apache:apache /var/www/html/magento2-community-edition
chmod -R 777 /var/www/html/magento2-community-edition

6. Install the php-intl extension with the following command :-

# yum install php-intl   ==> For Fedora21
# yum install php56w-intl =====> For CentOS-6.7

7. Now go inside magento2 directory and install it with composer :-


# mv /var/www/html/magento2-community-edition /var/www/html/magento2
# cd /var/www/html/magento2
# composer install 

8. You need to change the permission once again and restart the httpd web service to take effect :-

# chmod -R 777 /var/www/html/magento2
# service httpd restart

9. Now open the browser for GUI installation :- 

http://localhost/magento2




You will be shown this error do the following as given below :-



Open php.ini file and uncomment the following line :-

vim /etc/php.ini

# uncomment the below line 
always_populate_raw_post_data -1

save and exit;



After that restart httpd service to take effect 

# service httpd restart

Click on "Try Again" in the installation wizard :-



Now insert the database details which we have created earlier :-



Now copy the Magento2 admin URL :-



Enter Time and Currency setting :-



Enter the Username and password for normal user


Click on "Install"


After the successful installation you will be provided the information of login details copy it or take screenshot of it.





After that change the permission as given in the screenshot above.


# chmod 755 /var/www/html/magento2/app/etc

If the Admin panel does not open in Google chrome then open it in firefox or clear google chrome cookie .





That's it Now enjoy using magento2

Please do Likes,Comment and Share 
Please also make some donation as it is very much required to continue writing articles. 




Related Posts :

Subscribe by Email

Follow Updates Articles from This Blog via Email

No Comments