Hi everybody, I am Cuong, Welcome back to my Magento 2 tutorial video series.

Today, I am going to show everybody the best practice, How to install Magento 2.3 on Ubuntu with Nginx.

In this video, I will show everybody steps by step to install Magento 2.3 on Ubuntu 16.04 with Nginx 1.10.x, PHP 7.2.x and MySQL 5.7.

Okie, let’s go.

Let’s do this practice, you need to follow steps by step:

Step 1: Installing the server.
– cat /etc/*release (check your current Ubuntu version)
I have Ubuntu 16.04 on my localhost.
– You can check the requirements system for Magento 2.3 in the link
– Install the softwares:
apt-get update
apt-get -y install git wget curl nano unzip sudo vim net-tools openssh-server
– Install the Nginx 1.10.x:
apt-get -y install nginx
service nginx start
nginx -v
– Install PHP 7.2.x and the required PHP extensions:
apt-get install software-properties-common
add-apt-repository ppa:ondrej/php
apt-get update
apt-cache search php7.2
apt-get install php7.2 libapache2-mod-php7.2 php7.2-common php7.2-gd php7.2-mysql php7.2-curl php7.2-intl php7.2-xsl php7.2-mbstring php7.2-zip php7.2-bcmath php7.2-soap php-xdebug php-imagick
php -v
– Install PHP 7.2 FPM:
apt-get install php7.2-fpm
nano /etc/php/7.2/fpm/php.ini
press ctrl + w for searching
memory_limit = 2G
max_execution_time = 3600
max_input_time = 1800
upload_max_filesize = 10M
zlib.output_compression = On
press ctrl + O for saving.
service php7.2-fpm start
– Install MySQL 5.7
apt-get install -y mysql-server mysql-client
enter the password for the root user: giaphugroup
service mysql start
mysql_secure_installation
SHOW VARIABLES LIKE “%version%”;
– Install Composer:
curl -sS | php — –install-dir=/usr/local/bin –filename=composer
composer –version
– Install phpMyAdmin
Create the new folder named phpmyadmin in the path /var/www/html/
mkdir phpmyadmin

Download phpMyAdmin:
wget
unzip phpMyAdmin-4.8.5-all-languages.zip

Create a new virtual host for accessing to phpmyadmin
nano /etc/nginx/sites-available/phpmyadmin
server {
listen 9000;
root /var/www/html/phpmyadmin/phpMyAdmin-4.8.5-all-languages;
server_name localhost;
index index.php index.html index.htm;

location / {
try_files $uri $uri/ /index.php?$args;
}

location ~ .php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.2-fpm.sock;
}
location ~ /.ht {
deny all;
}
}
ln -s /etc/nginx/sites-available/phpmyadmin /etc/nginx/sites-enabled
– Restart Nginx:
nginx -t
service nginx restart
netstat -plnt
3306 is of mysql service
9000 of the phpmyadmin site

Step 2: Install and configure Magento 2.3.0
– Create the Magento authentication keys:
– Create the new database named magento2_3_0:
– cd /var/www/html
– composer create-project –repository-url= magento/project-community-edition=2.3.0 magento2.3.0
– cd magento2.3.0
find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} +
find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} +
chown -R :www-data .
chmod u+x bin/magento
php bin/magento setup:di:compile
– Create a new virtual host for accessing to the Magento2.3.0 site
nano /etc/nginx/sites-available/magento2.3.0
upstream fastcgi_backend {
server unix:/run/php/php7.2-fpm.sock;
}

server {
listen 86;
server_name localhost;
set $MAGE_ROOT /var/www/html/magento2.3.0;
include /var/www/html/magento2.3.0/nginx.conf.sample;
}
ln -s /etc/nginx/sites-available/magento2.3.0 /etc/nginx/sites-enabled
– Restart Nginx:
nginx -t
service nginx restart
netstat -plnt
86 is of the magento 2.3.0 site.

– Install Magento 2.3.0:
– cd /var/www/html/magento2.3.0
php bin/magento setup:static-content:deploy -f

Let’s install the sample data for Magento 2 please see the practice

Thank you for watching guide. If you have any questions about this practice, please feel free to leave a comment below.

Don’t forget to like, comment, share my videos and subscribe to my channel for getting the latest videos.

Please do not hesitate to contact me, if you need me to join your Magento project. My rate is $25/hour in Magento 1 and $30/hour in Magento 2.

Nguồn: https://codeigniterbrasil.com

Xem thêm bài viết khác: https://codeigniterbrasil.com/lap-trinh-php/

11 Comments

Magento 2 Vlogs

May 12, 2020

Let's get a notification about the latest lessons, please subscribe to my channel now.

Reply

Nguyễn Tiến Long

May 12, 2020

Cảm ơn anh, bài hướng dẫn rất hữu ích và thực tế sau cả ngày mò mà không cài được. Cho em hỏi, em đang cài local: nếu em muốn cài thêm site khác thì phải config như nào ạ? Theo như em làm mò tạo file /etc/nginx/sites-available mới thì sẽ bị duplicate upstream.

Reply

Asra Shoaib

May 12, 2020

Thanks a lot man , helped to setup my local store

Reply

Eskimoz

May 12, 2020

Efficace et accessible merci 🙂

Reply

Shota Lekashvili

May 12, 2020

I'm doing it in ubuntu 18.04 LTS and it doesn't work, the nginx file is not loading after installation.

Reply

Mudasser Hayat

May 12, 2020

Awesome tutorial.

Reply

Никита Миронов

May 12, 2020

you are the best!very nice!

Reply

JOSUE AUGUSTO PAULETE PEREZ

May 12, 2020

What do I modify to install it in a google cloud instance?

Reply

Orion Valte

May 12, 2020

i follow your tutorial, yet i still got 403 error in Nginx. Please suggest

Reply

Raymond Calderon

May 12, 2020

nice, thanks uwu

Reply

a lester

May 12, 2020

I use docker with PHP 7/7.1+nginx+myadmin

Reply

Leave a Reply