How to Install Magento 2.3.6 Under Nginx & Centos 7?

When I install Magento, the latest Magento version is Magento ver 2.4.3-p1, and ver 2.3.7-p2. You may ask why I do not install the latest version, instead, I choose Magento ver 2.3.6-p1.

My hosting server is using Centos7, Nginx, and php7.3. Just because the PHP version is 7.3. I only can choose Magento ver 2.3.6-p1. Magento ver 2.4.3-p1, and ver 2.3.7-2 need php7.3, and ElasticSearch. I do not want to use ElasticSearch either. My web hosting server is only 2 cores and 4 Gb of memories. Before I have tried to install Elastic Search, the server runs much more slower!

Next are the steps and the issues I met while I install Magneto ver 2.3.6-p1. The demo shop is https://www.eyewearca.com

Download Magento 2.3.6-p1
https://magento.com/tech-resources/download

Why do I choose to download Magento 2.3.6-p1, and not install it using composer? I also have tried using composer already. I met so many issues.

cd www.eyewearca.com (cd /home/glasses/eyewearca.com)

upload magento 2.3.6-p1

unzip magento-ce-2.3.6-p1.zip

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.www . # vim /usr/local/nginx/conf/nginx.conf, check nginx user group
chmod u+x bin/magento

install magento:

bin/magento setup:install \
–base-url=’https://www.eyewearca.com’ \
–db-host=’localhost’ \
–db-name=’cheapglasses’ \
–db-user=’prescriptionglasses’ \
–db-password=’sportsglasses’ \
–admin-firstname=’Glasses’ \
–admin-lastname=’Shop’ \
–admin-email=’help@eyewearca.com’ \
–admin-user=’eye’ \
–admin-password=’discountglasses’ \
–language=’en_US’ \
–currency=’USD’ \
–timezone=’Asia/Shanghai’ \
–use-rewrites=’1′

errors:

PHP Fatal error: Allowed memory size of 2097152 bytes exhausted (tried to allocate 4096 bytes) in /home/glasses/eyewearca.com/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Indices/GetTemplate.php on line 57

method:
php.ini
memory_limit = -1

Backend load very slow!

php bin/magento setup:static-content:deploy -f

rm -rf var/cache/* var/generation/* var/page_cache/* var/view_preprocessed/*

rm -rf var/cache/* generated/*

chmod -R 777 var pub generated

php bin/magento deploy:mode:set production
php bin/magento setup:upgrade
bin/magento s:d:c
php bin/magento setup:static-content:deploy
php bin/magento indexer:reindex

Why degrade composer? Mangeto ver 2.3.6 does not support composer 2 well.

composer self-update 1.10.16

[2021-12-06 09:08:45] main.CRITICAL: Unable to unserialize value. {“exception”:”[object] (InvalidArgumentException(code: 0): Unable to unserialize value. at /home/glasses/eyewearca.com/vendor/magento/framework/Serialize/Serializer/Serialize.php:33)”} []

method:

1 Change directory to the Magento root. cd /home/eyeglasses/www.eyewearca.com
2 Run composer require magento/product-community-edition 2.3.6-p1 –no-update
3 Run composer update
4 Run php bin/magento setup:upgrade

Published
Categorized as Magento