-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathinstruction.text
128 lines (113 loc) · 5.07 KB
/
instruction.text
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
I am going to show everybody the best practice, How to install Magento 2.3x on Ubuntu with Nginx.
I will show everybody steps by step to install Magento 2.3x on Ubuntu 18.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 18.04 on my localhost.
- You can check the requirements system for Magento 2.3 in the link https://devdocs.magento.com/guides/v2.3/install-gde/prereq/nginx.html
1.1- 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
1.2- 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
1.3- 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 https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
composer --version
1.4- Install phpMyAdmin
Create the new folder named phpmyadmin in the path /var/www/html/
mkdir phpmyadmin
Download phpMyAdmin:
wget https://files.phpmyadmin.net/phpMyAdm...
unzip phpMyAdmin-4.8.5-all-languages.zip
1.5-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.2
- Create the Magento authentication keys: https://marketplace.magento.com/
- Create the new database named magento2_3_0: http://localhost:9000
- cd /var/www/html
-composer create-project --repository=https://repo.magento.com/ magento/project-community-edition <install-directory-name>
[ composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition=2.3.2 magento2.3.2]
- cd magento2.3.2
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.2 site
nano /etc/nginx/sites-available/magento2.3.2
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.2;
include /var/www/html/magento2.3.2/nginx.conf.sample;
}
ln -s /etc/nginx/sites-available/magento2.3.2 /etc/nginx/sites-enabled
- Restart Nginx:
nginx -t
service nginx restart
netstat -plnt
86 is of the magento 2.3.2 site.
- Install Magento 2.3.2: http://localhost:86
- cd /var/www/html/magento2.3.2
php bin/magento setup:static-content:deploy -f
Ref##
https://devdocs.magento.com/guides/v2.3/install-gde/prereq/nginx.html
https://devdocs.magento.com/guides/v2.3/install-gde/composer.html
https://linuxconfig.org/how-to-setup-the-nginx-web-server-on-ubuntu-18-04-bionic-beaver-linux
https://www.howtoforge.com/tutorial/how-to-install-nginx-with-php-and-mysql-lemp-on-ubuntu-1804/
https://www.simicart.com/blog/magento-2-composer/
Thank you for watching guide. If you have any questions about this practice, please feel free to leave a comment below.
Please do not hesitate to contact me, if you need me to join your Magento project.
My rate is $18/hour in Magento 1 and $20/hour in Magento 2.