loading...

How to Install Magento 2?

bhavikrocktech profile image Bhavik ・5 min read

Magento 2, the latest upgrade of the previous version Magneto 1 which was officially released with present modern technologies and simplified customization as well as modified directories, in no time became the favourite eCommerce platform for over 200,000 online retailers.

Magento 1 is infamous for it’s slow-loading compared to alternative platforms. Upgrading to Magento 2 is as a result of it’s speedy and temporary caching setup. Magento 2 features an easy and intuitive interface that allows you to create distinctive styles for every article using the inbuilt WYSIWYG editor or directly writing the HTML source code. The key to Magento’s quality is in its standard structure, strong design, and underlying technologies. To get Magento 2 running on your online store, here ’s the complete Magento 2 installation guide for you.

HOW TO INSTALL MAGENTO 2?

Step 1: Download the Magento 2 package
Step 2: Verify the prerequisites
Step 3: Select the installation method from different archive sorts (zip, tar.gz, tar.bz2), with and without sample data.
Step 4: Upload to your server
Step 5: Run a check
This is just the basic way of installation. Now let’s see in detail how to install Magento 2 in different OS. Before that, the following are the common system requirements which are must for Magento 2 installation.

SYSTEM REQUIREMENTS

Operating systems: Windows, Linux distributions such as RedHat Enterprise Linux (RHEL), CentOS, Ubuntu, Debian, and so on. If less than 2GB of RAM, we tend to suggest you produce a swap file; otherwise, your upgrade may fail.

Composer: Latest stable version, necessary for developing Magento extensions..

Web servers: Apache 2.2 or later

PHP: 5.4.11, 5.5.x, 7.0.13–7.0.x, 7.1.x (Note: Magento 2 does not support PHP 5.6.)

Required PHP extensions: PDO/MySQL, mbstring, mcrypt, mhash, simplexml, curl, gd2, ImageMagick 6.3.7 (or later) or both soap

Database: MySQL 5.6, 5.7

Mail Transfer Agent (MTA) or an SMTP server

OPTIONAL BUT RECOMMENDED:
php_xdebug2.2.0 or later (development environments only; can have an adverse effect on performance)
PHPUnit (as a command-line tool) 4.1 or later
SSL: A valid security certificate is required for HTTPS. (Note: Self-signed SSL certificates are not supported.)

HOW TO INSTALL MAGENTO 2 ON WINDOWS 10?

Step 1: Install XAMPP Server on your computer from https://sourceforge.net/projects/xampp/
Step 2: Configure Xampp. Run your XAMPP web environment and start Apache and MySQL Service
Step 3: Enable the specified php extensions by clicking on the “config” button of apache and selecting the php.ini configuration file.
Step 4: In the configuration file enable the extension “intl” and “xsl” by finding the lines for the extensions using “ctrl+f”. Remove the semicolon before the line to uncomment it and finally save and close the file. Now, stop and start the Apache Service.
Step 5: Download Magento 2 on your Windows machine in zip format. You can also find the clone in Git GUI software fromhttps://github.com/magento/magento2
Step 6: Download and install the Composer via the Composer-Setup.exe file using the default settings. Specify the path of php.exe file. Provide the path and click next and finish
Step 7: Install Magento2 dependencies using Composer by extracting the zip file in the htdocs folder present in the XAMPP installation directory. Go to the Magento2 folder and select “Open command window here”. This will open the command prompt on that location. Run the command “composer install” on the command prompt. This will install the required dependencies for Magento2.
Step 8: Create a MySQL Database. Open your favourite web browser. Enter the URL “http://localhost/phpmyadmin” and press enter to open your phpmyadmin page.
Step 9: Go to menu>new and create a database by the name magento2.
Step 10: Install Magento2. Open your web browser, and enter the URL “http://localhost/magento2” and hit enter. You will see a Magento Installer screen. Click on readiness check to verify if all the dependencies are present. Click on next to configure the database. Configure your web storefront and click to “Customize Your Store” in terms of currency, language, and time zone. Create an “Admin Account” to set up a Magento administrator and perform all the required actions. At the welcome page, click Agree and Setup Magento.

HOW TO INSTALL MAGENTO 2 ON UBUNTU?

Step1: Install Apache2 HTTP Server by running the following commands;
sudo apt-get update
sudo apt-get -y install apache2
Step 2: Enable apache rewrite and headers module using the below commands
sudo a2enmod rewrite
sudo a2enmod headers
sudo service apache2 restart
Step 3: Install MySQL as the server using the MySQL client - apt-get install mysql-server mysql-client
Step 4: Now change as per the requirements Apache config file - vim /etc/apache2/sites-available/000-default.conf
Step 5: Change the PHP memory limit in the Apache server by entering the code - vim /etc/php5/apache2/php.ini
Step 6: Start the Apache web service using the following commands; /etc/init.d/apache2 start
Step 7: Now, get the MySQL DB ready for the Magento 2 setup. Please follow the steps to configure correctly - mysql -u root -p
Step 8: Create a DB using the name “my_store” (or anything you like). mysql>CREATE DATABASE my_store;
Step 9: Create a user name “my_store_user” mysql>CREATE USER my_store_user@localhost IDENTIFIED BY 'user_pass';
Step 10: Next, setup privileges for “my_store”. As “my_store” must have all privileges for the Mage DB: mysql> GRANT ALL ON my_store. * TO my_store_user@localhost;
Step 11: Download Magento 2 from MageAnts
Step 12: Extract the Mage 2.2.0.zip file and make a copy of the contents to the following path:
/var/www/html
unzip Magento-2.2.0.zip
cp -Rrfv magento/* /var/www/html/
Step 13: Next, change the permissions as following; chown -R www-data:www-data /var/www/html/
Step 14: Edit file permissions as per requirements - chmod -R 755 /var/www/html
Step 15: Finally, using the following commands restart Apache & the MySQL DB
/etc/init.d/apache2 restart
/etc/init.d/mysql restart
Step 16: Install Magento 2 on Ubuntu
Step 17: Open the following link in the browser; http://127.0.0.1/index.php/install
Step 18: Click next to continue with the setup.
Step 19: Further provide the DB credentials (user_name, pass etc.).
Step 20: Two options will appear on the screen. Now, click to the backend. It will redirect to the login page. Then log in using your admin account details and you're done.

CONCLUSION

Migrating from Magento 1 to Magento 2.0.will benefit you in terms of extensions, themes, custom development, and data as well. Plus, with the addition of suitable extensions of MageAnts to your Magento 2 bases online store, sales and customer experience will shoot up high like a rocket in the sky.

Posted on Feb 15 '19 by:

Discussion

markdown guide