5 (100%) 1 vote

Hello everyone. Today, I will show you how to install Magento 2 on Ubuntu server. Before installing Magento 2 on ubuntu server, you must prepare:

  • Magento installation (The newest Magento 2.1.2)
  • Filezilla (to upload the source code)
  • Putty (to connect to the ssh console)

Step 1: Upload the source code to the server by using filezilla:

 

  • Open filezilla and connect to the server use the FTP information. To make the upload file more faster, please upload the .zip file to the directory which you want to install.
  • In this tutorial, I will upload it to /home/eden/public_html/magento2 (because my website domain point to this folder).
install Magento 2 on Ubuntu server
install Magento 2 on Ubuntu server
  • Login to SSH console by using putty or git bash. You can use username or password or private key to login to SSH (it depends on your server).
  • After that, use “cd” command line to the Magento 2 directory and use the unzip command to extract the Magento 2 zip file.
install Magento 2 on Ubuntu server
install Magento 2 on Ubuntu server
  • After using the unzip command, you will receive the files and the folders of Magento 2.1.2

Step 2: Create the database for the Magento 2:

  • Login to the mysql server:

mysql -u root -p

  • Mysql will ask you the password. After enter the password, you will go to the command line:
install Magento 2 on Ubuntu server
install Magento 2 on Ubuntu server
  • Use the create command line to create the database. Example : magento2

CREATE DATABASE magento2;

Step 3: Open the browser and enter your website domain:

install Magento 2 on Ubuntu server
install Magento 2 on Ubuntu server
  • Click Agree and Setup Magento
install Magento 2 on Ubuntu server
install Magento 2 on Ubuntu server
  • Click Next
install Magento 2 on Ubuntu server
install Magento 2 on Ubuntu server
  • Click Next again.
install Magento 2 on Ubuntu server
install Magento 2 on Ubuntu server
  • Fill the Username, Password, Database name and click next
install Magento 2 on Ubuntu server
install Magento 2 on Ubuntu server
  • Change the admin address and next again.
install Magento 2 on Ubuntu server
install Magento 2 on Ubuntu server
  • Next again.
install Magento 2 on Ubuntu server
install Magento 2 on Ubuntu server
  • Enter the admin, password and next.
install Magento 2 on Ubuntu server
install Magento 2 on Ubuntu server
  • Click install now. Wait the success message:
install Magento 2 on Ubuntu server
install Magento 2 on Ubuntu server
How to Use All Commands in Magento 2 CLI (Part 4)
How to Use all Commands in Magento 2 CLI - Magento 2.3