At start point, we too faced issues, some easily understandable and some troublesome. Finally after much effort, we were able to successfully install Magento2 with sample data which worked efficiently and smoothly.
Checkout the below-mentioned steps in order to carry hassle-free Magento2 installation :
NOTE: It is mandatory that all the below mentioned settings are done and all the required server configuration are met.
Prerequisite Settings for Server in order to install Magento2:
We will need to check our server setting for Apache, Php and Mysql. Let us check all of them step by step:
Magento2 requires Apache 2.2 or 2.4
You can check your Apache version from your Terminal (Ctrl + Alt + T):
After successfully installing or upgrading apache, you will have to carry out below-mentioned configuration setting prior to final Magento2 installation.
1) Check if the apache module rewrite is enabled or not. For this just create a phpinfo.php file in your root directory and search for mod_rewrite.
If found, then no need to worry, it is enabled in your server configuration else need to enable it. You can enable mod_rewrite from your command prompt by:
2) Next step is to navigate to the location where your apache2.conf file is located. Generally, it is in below mentioned location:
In order to find the location of your apache2.conf file, enter following command in your command prompt.
You will get a list of all locations where apache2.conf is located. Now place the following command to edit apache2.conf configuration.
After inserting this command, if a blank file opens, then you need to assure that your provided path doesn’t contain apache2.conf file or your path is wrong. So, in this case, close the file and confirm your apache2.conf path.
NOTE: Generally, in ubuntu apache2.conf is located in /etc/apache2/ So, there are least chances that you get blank file.
Now, it’s time to edit some configurations to meet our requirement.
In apache.conf search for following command:
and replace this with
NOTE: We just edited the AllowOverride from None to All
Next, search for
and replace with
Finally, add following line at end of page:
Save and Close the file.
3) After all the configuration is done, it’s time to restart Apache, Insert following code in command prompt:
That’s it. Our Apache2 configuration is Done.
Now, head to php requirement.
Magento2 requires your Php version to be 5.5.x or 5.6.x(PHP 5.4 is not supported)
You can check php version from your command prompt by:
In addition to this, you will have to confirm two php.ini file extensions i.e .intl and .xsl, that are must for Magento2 configuration.
In order to install both the extension, you need to run following command in your command prompt:
That’s all, we are ready with our php configuration also.
Magneto2 installation requires mysql version to be 5.6.x
In order to check mysql version :
<span style="font-size: large;">mysql-version</span>
Once confirming that all the above mentioned are satisfied, we now need to follow final Magento2 installation step.
Extract the Zip file in your root directory
Create an empty database from your phpmyadmin(or your preferred server)
Run the setup file in browser
Follow all the steps and fill up all necessary information based on your requirement and finally click install button to install Magento2 setup on the respective Browser path. This step will take some time in order to follow sample data.
After successful installation, you will get link to your store front-end and backend.