How to install Magento 2.4.6 in Ubuntu

What is Magento ?

Magento is opensource e-commerce platform, which provides online merchants with a flexible shopping cart system. Magento offers powerful marketing, search engine optimization, and catalog-management tools.

Basic system requirment of Magento 2.4.6

Require these 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
  • ext-xml
  • ext-xmlreader
  • ext-xmlwriter
  • lib-libxml (DOMDocument)

Require Magento access keys

Magento access keys you can get from your account.

Magento Account > My profile > Marketplace >Access Keys

Download opensource Magento using composer

composer create-project --repository-url= magento/project-community-edition .

Download Magento commerce using composer

composer create-project --repository-url= magento/project-enterprise-edition .

Install any specific Magento version

composer create-project --repository-url= magento/project-community-edition:2.4.2

Give require permission to directory

We need to give correct permission to Magento directories by this below commands:

find . -type f -exec chmod 644 {} \;            
find . -type d -exec chmod 755 {} \;        
chmod -Rf 777 var
chmod -Rf 777 pub/static
chmod -Rf 777 pub/media
chmod 777 ./app/etc
chmod 644 ./app/etc/*.xml
chmod -Rf 775 bin

Create new database for Magento

We need to create empty database for new Magento setup.

mysql> CREATE DATABASE mag24;

Install Magento 2 using command

Before install we need to check elasticsearch is running and check MySQL server is running. Run the following lines in Command Line to install your Magento 2:

php bin/magento setup:install 

That’s all for installing Magento 2 in ubuntu.

Fill free to ask me any of the Magento issues or contact me if your need any customisation or other Magento related service.

Will provide you these Magento services click here for more details

Leave your comment

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