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).
- 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.
- 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:
- Use the create command line to create the database. Example : magento2
CREATE DATABASE magento2;
Step 3: Open the browser and enter your website domain:
- Click Agree and Setup Magento
- Click Next
- Click Next again.
- Fill the Username, Password, Database name and click next
- Change the admin address and next again.
- Next again.
- Enter the admin, password and next.
- Click install now. Wait the success message: