-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_commands02
61 lines (44 loc) · 2.21 KB
/
test_commands02
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
apt-get -y update && \
apt-get install -y software-properties-common && \
add-apt-repository -y ppa:ondrej/php && \
apt-get -y update && \
apt-get install -y php7.2-fpm php7.2-bcmath php7.2-common php7.2-mbstring php7.2-soap php7.2-gd php7.2-xml php7.2-intl php7.2-mysql php7.2-cli php7.2-zip php7.2-curl
#Open the php.ini files in an editor:
vim /etc/php/7.2/fpm/php.ini
vim /etc/php/7.2/cli/php.ini
#Edit both files to match the following lines:
memory_limit = 2G
max_execution_time = 1800
zlib.output_compression = On
#We recommend setting the memory limit to 2G when testing Magento. Refer to Required PHP settings for more information.
#Save and exit the editor.
#Restart the php-fpm service:
systemctl restart php7.2-fpm
#MYSQL
apt-get install -y mysql-server mysql-client && \
service mysql start && \
echo "CREATE DATABASE magento2" | mysql -u[mysqluser] -p
mysql
#CREATE DATABASE magento2_db;
#GRANT ALL ON magento2_db.* TO 'magento2_usr'@'localhost' IDENTIFIED BY 'magento';
#EXIT;
echo "CREATE DATABASE magento2_db; GRANT ALL ON magento2_db.* TO 'magento2_usr'@'localhost' IDENTIFIED BY 'magento'" | mysql
wget https://github.com/magento/magento2/archive/2.3.2.tar.gz && \
tar -xzvf 2.3.2.tar.gz && \
chown -R www-data:www-data /var/www/html/magento2-2.3.2/ && \
chmod -R 775 /var/www/html/magento2-2.3.2/ && \
mv magento2-2.3.2/ magento2 && \
rm 2.3.2.tar.gz && \
cd magento2 && \
su magento
# https://www.simicart.com/blog/magento-2-nginx/
#Install Composer globally.
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/bin --filename=composer && \
#Update Magento dependencies:
composer install -v
Enter your Magento authentication keys.
Run the below in command line to install Magento:
cd /var/www/html/magento2/
php bin/magento setup:install --base-url=http://localhost/magento2 --db-host=localhost --db-name=magento2_db --db-user=magento2_usr --db-password=magento --admin-firstname=admin --admin-lastname=admin [email protected] --admin-user=admin --admin-password=admin123 --language=en_US --currency=USD --timezone=America/Chicago --use-rewrites=1
chown -R www-data:www-data /var/www/html/magento2/ && \
chmod -R 775 /var/www/html/magento2/