How to install Magento CE 2.4.1 on ubuntu 16.04

Updated 11 January 2021

Magento version 2.4.1 is officially rolled out. You can visit GitHub to find the source code for Magento.

What’s new?

Magento Open Source 2.4.1 introduces enhancements to performance and security.

Security enhancements include support for the SameSite attribute for cookies and the addition of CAPTCHA protection for payment-related and order-related API endpoints and the Place Order storefront page.

Magento 2.4 system requirements

Operating systems (Linux x86-64)

Linux distributions, such as Ubuntu, Debian, RedHat Enterprise Linux (RHEL), CentOS, and similar.

Magento is not supported on Microsoft Windows and macOS.

Memory requirement

Upgrading the Magento applications and other sources can require up to 2GB of RAM. If you are using a system with less than 2GB of RAM, your upgrade might fail.

Supported browsers

  • Microsoft Edge
  • Mozilla Firefox
  • Google Chrome
  • Safari

Composer

Composer is required for developers who wish to contribute to the Magento 2 codebase.

Web servers

  • Apache 2.4
  • nginx 1.x

Database

  • MySQL 8.0
  • MariaDB 10.4

PHP

Magento supports PHP 7.4.0

Required PHP extensions

  • ext-bcmath
  • ext-ctype
  • ext-curl
  • ext-dom
  • ext-gd
  • ext-hash
  • ext-iconv
  • ext-intl
  • ext-mbstring
  • ext-openssl
  • ext-pdo_mysql
  • ext-simplexml
  • ext-soap
  • ext-xsl
  • ext-zip
  • ext-sockets

PHP OPcache

PHP OPcache is recommended for performance reasons.

Elasticsearch

As of Magento 2.4.0, MySQL is no longer used for search. You must use Elasticsearch. Magento is tested with Elasticsearch 7.6.x.

Magento no longer supports Elasticsearch 2.x, 5.x, and 6.x.

Create database

mysql -u root -p -e “CREATE DATABASE database_name;”

Some common Magento installation issues:

  1. Class ‘Locale’ not found

To Resolve the above error make sure php-intl extension is installed.

2. Fatal error: Maximum function nesting level of “100” reached, aborting!

Set the value of xdebug.max_nesting_level to a value of 500 or more in the enabled php.ini and also restart apache2 services after doing the changes.

Install the Magento using the command line

  1. First we need to create a directory using mkdir command followed by directory name.

mkdir magento

2. Now change present working directory to magento using cd command.

cd magento

3. Now Download magento using composer.

composer create-project –repository-url=https://repo.magento.com/ magento/project-community-edition:2.4.1 .

4. Now install magento using the command given below after using the proper variables like host, database name, username and password etc

php bin/magento setup:install –base-url=http://localhost/magento2.4/ –db-host=db-host –db-name=db-name –db-user=db-user –db-password=db-password –admin-firstname=Magento –admin-lastname=User –[email protected] –admin-user=admin –admin-password=admin123 –language=en_US –currency=USD –timezone=America/Chicago –use-rewrites=1 –search-engine=elasticsearch7 –elasticsearch-host=elastic-host –elasticsearch-port=elastic-port –backend-frontname=admin

once this command is executed successfully output will be similar as shown in the image given below.

Now magento is installed successfully, just hit the URL now in the browser.

After installation, you will not be able to login Magento admin panel because in Magento2.4 two-factor authentication is installed and it will not let you log in.

You can log in only after providing the correct email and configure SMTP so that Magento can send an email, in that case, we can disable the two-factor authentication module and set up it later from the admin panel, the command to disable the module is given below-

php bin/magento module:disable Magento_TwoFactorAuth

Now you can log in to the admin panel.

In case of any help or query, please contact us or raise a ticket

author
. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


Be the first to comment.

Start a Project




    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home