How to install Magento2.4.2 via ISPconfig in Ubuntu20

1. Introduction

 
This guide will show you how to install Magento 2.4.2 via ISPconfig in Ubuntu 20.
 

2. Install PHP Extensions and the Composer Tool

composer installation
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
 
PHP extension installation:
apt install php-bcmath php-amqplib
 

3. Install Elasticsearch

sudo apt update
sudo apt install apt-transport-https ca-certificates wget
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
sudo sh -c 'echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" > /etc/apt/sources.list.d/elastic-7.x.list'
sudo apt update
sudo apt install elasticsearch
sudo systemctl enable --now elasticsearch.service
curl -X GET "localhost:9200/"
 

4. Deploy a Magento Instance

4.1 Create a Magento website and database via ISPConfig

https://portal.databasemart.com/kb/a395/how-to-create-a-website-by-ispconfig.aspx
https://portal.databasemart.com/kb/a397/how-to-create-mysql-databases-by-ispconfig.aspx
 

4.2 Download the Magento 2.4.2 Files

You can download it from the address below: (or download it from the official Magento website)
https://github.com/magento/magento2/releases
 

4.3 Unzip the Magento Files and Put them Under the root directory of the Website

Note: Move the Magento file folder to the root directory of the website, and replace the web directory with the Magento file folder.
chattr -i /var/www/clients/client0/web1
cd /var/www/clients/client0/web1
chattr -i web
rm web -rf
mv /home/administrator/magento/magento2-2.4.2 web(Please replace the file path with the one where your Magento is downloaded)
 

4.4. Install necessary modules through the composer tool

cd /var/www/clients/client0/web1/web
composer install
 

4.5. Install Magento through the following commands

(Please replace the field value with your specific value)

./bin/magento setup:install \
--base-url=http://magento.shared-servers.com \
--db-host=127.0.0.1 \
--db-name=magentodatabase \
--db-user=magento_user \
--db-password=password_of_database \
--backend-frontname=admin \
--admin-firstname=admin \
--admin-lastname=admin \
--admin-email=rtest@shared-servers.com.com \
--admin-user=admin \
--admin-password=password_for_admin_user \
--language=en_US \
--currency=USD \
--timezone=America/Chicago \
--use-rewrites=1 \
--search-engine=elasticsearch7 \
--elasticsearch-host=127.0.0.1 \
--elasticsearch-port=9200
 

4.6.Modify the file permissions

cd /var/www/clients/client0/web1/web
chmod 776 /var/www/clients/client0/web1/web -R && chown www-data:www-data /var/www/clients/client0/web1/web -R
 

4.7 Vefiry a successful installation

 
 

Add Feedback