How to Install Magento2 in Ubuntu 18.04 | 20.04

Hosting

Magento2 is an e-commerce platform built on open source technology that provides online merchants with a flexible shopping cart system, as well as control over the look, content, and functionality of their online store.

Here in this tutorial, we are going to discuss how to install Magento2 on CloudStick.

Follow the step by step procedure:

Step 1: Log in to your CloudStick account and select the server

Step 2: Create a custom PHP web application to install Magento2

After selecting the server, scroll down to the web application menu. Click on ‘Manage’

Magento2

Then, click on the ‘Create account’ option.

NOTE: Please ensure that the File system quota is enabled before performing this procedure.

CloudStick

Select the Custom PHP web application from the list.

Fill in the required details.

Start with your email address. Provide a valid email address in the specified area.

For the ‘Web application name’, here we are using ‘magento’. You can use any name you like.

For ‘Domain name’, you can use either your own domain or a CloudStick free domain. If you are using your own domain, make sure you configure the DNS record for the same.

Note: If you use your own domain, you can install an SSL Certificate for your website.

Here we are using ‘magentouser’ as the username.

Next is to set a password for the web application, then enter the quota size you want. Here, we are setting it as 1024M (1GB).

Here we are using PHP 7.3 for magento2.

For ‘Web Application Stack’, choose ‘Nginx + Apache’ which will allow you to use the .htaccess file.

Click the ‘Advanced Settings’ checkbox if you want to configure some extra settings.

Then click on “Add web application”.

Perfect, now we have created a web application for Magento2.

Step 3: Database Setup

For Magento2, we need to create a database. You can easily do this from the CloudStick dashboard.

Click on the ‘Databases’ tab from the side menu. Create a database and a database user.

Then click on the ‘Grant User’ option to connect the user with the database. You can also set a password for the database user from the dashboard.

Here, we have created a database ‘magentodb’ and database user ‘magentodbuser’.

Step 4: Install Magento2

Download Magento2

First and foremost, you need to register with Magento to download Magento2. Sign up to Magento and they will send you a verification email. After verifying it. You can go to the download page and download the Magento version you want.

Now, transfer the files to the server.

We are using Filezilla via SFTP to transfer the files to the server, under the web application root.

After transferring the file via Filezilla, unzip the file from the CloudStick dashboard.

Go to ‘File Manager’ select the file you want to unzip and click on ‘Extract’.

Click on ‘Extract File’ to unzip the file.

You can now open the Magento2 web application inside your browser with the domain name you have created.

Perfect! Now you can proceed with the setup wizard.
Click on “Agree and Setup Magento” to continue.

Magento2 by default will try to use TLS. When you click on the start readiness check, you will see a bunch of error messages.
For this, we need to edit the composer.json inside your Magento2 root directory. We can do this from the CloudStick dashboard itself:

Open the file and find the line with “config”: { and add the below lines:

“config”: {
“use-include-path”: true,
“disable-tls”: true
},

Save the composer.json file.

Click on ‘Next” after the ‘Readiness Check’

In the database section inside Magento2 installation, use localhost as the database host. Then provide the database details which we created earlier.

Click on ‘Next to complete the Web configuration.

Create your administrator account and click on next. Now you will have the installation page. Click on ‘Install Now’ to complete the installation.

After installation, you will see a page with a success message like this:

Click on ‘Launch Magento Admin’ to log in to your account.

When you login into Magento admin, if the image doesn’t load, go to the web application root directory and run this command:

php bin/magento setup:static-content:deploy

Then refresh the browser and you will see the below page:

That’s it!! You have successfully installed Magento2 on CloudStick.

Leave a Reply

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