Step-by-Step Magento2 Installation Guide For Ubuntu

commas-left

Magento2 basically require certain Server configuration for successful integration.

If all the server requirements are met, one can install Magento2 in no time.

commas-right

Magento2 Installation Guide for ubuntu

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:

Apache:

Magento2 requires Apache 2.2 or 2.4

You can check your Apache version from your Terminal (Ctrl + Alt + T):

sudo apache2 -v

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:

sudo a2enmod rewrite

2) Next step is to navigate to the location where your apache2.conf file is located. Generally, it is in below mentioned location:

/etc/apache2/apache2.conf

In order to find the location of your apache2.conf file, enter following command in your command prompt.

[email protected]:~$ whereis apache2.conf

You will get a list of all locations where apache2.conf is located. Now place the following command to edit apache2.conf configuration.

sudo gedit /etc/apache2/apache2.conf

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:

1
<span style="font-family: Sawasdee;"><span style="font-size: small;"><i>&lt;Directory /&gt;</i></span></span>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<span style="font-size: small;"><i>
Options FollowSymLinks
AllowOverride None
Require all denied
&lt;/Directory&gt;

&lt;Directory /usr/share&gt;
AllowOverride None
Require all granted
&lt;/Directory&gt;

&lt;Directory /var/www/&gt;
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
&lt;/Directory&gt;</i></span>

and replace this with

1
<code class="western"><span style="font-family: Sawasdee;"><span style="font-size: medium;"><i>&lt;Directory /&gt;</i></span></span>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<span style="font-size: medium;"><i>
Options FollowSymLinks
AllowOverride All
Require all granted
&lt;/Directory&gt;

&lt;Directory /usr/share&gt;
AllowOverride All
Require all granted
&lt;/Directory&gt;

&lt;Directory /var/www/&gt;
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
&lt;/Directory&gt;</i></span>

NOTE: We just edited the AllowOverride from None to All

Next, search for

1
<p class="western"><code class="western"><span style="font-family: Sawasdee;"><span style="font-size: medium;"><i>&lt;FilesMatch "^\.ht"&gt;</i></span></span>
1
2
3
<span style="font-size: medium;"><i>
Require all denied
&lt;/FilesMatch&gt;</i></span>

and replace with

1
<p class="western"><code class="western"><span style="font-family: Sawasdee;"><span style="font-size: medium;"><i>&lt;FilesMatch "^\.ht"&gt;</i></span></span>
1
2
3
<span style="font-size: medium;"><i>
Require all granted
&lt;/FilesMatch&gt;</i></span>

Finally, add following line at end of page:

Include /etc/phpmyadmin/apache.conf

Save and Close the file.

3) After all the configuration is done, it’s time to restart Apache, Insert following code in command prompt:

sudo service apache2 restart

That’s it. Our Apache2 configuration is Done.

PHP

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:

sudo php -v

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:

sudo apt-get install php5-intl
sudo apt-get install php5-xsl

That’s all, we are ready with our php configuration also.

MySql

Magneto2 installation requires mysql version to be 5.6.x

In order to check mysql version :

1
<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.

Download Magento2

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.

If you looking for magento2 developer to complete your insallation process, then click here.

Designed by Freepik

Leave a Reply

Your email address will not be published. Required fields are marked *

CAPTCHA

*