Let’s start configuring environment to install Magento 2.4 on Ubuntu.
Recent version of Magento requires some special configuration from other versions so i have explained the required configuration on fresh Ubuntu. By following the below command step by step we can setup the environment properly.
To install Apache 2.4 you can go through this url
To check system requirements as per the magento version, you can click: https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/system-requirements.html.
Install PHP version 7.4/8.1(based on magento version) by following commands.
All of the commands requires sudo access so run sudo su first
apt install software-properties-common
-
add-apt-repository ppa:ondrej/php
-
apt update
-
apt install php7.4
PHP-7.4 required extensions must be installed before installing Magento 2.4
$ apt-get install php7.4-{gd,curl,intl,bcmath,ctype,dom,iconv,mbstring,simplexml,soap,xsl,zip}
$ apt-get install php7.4-mysql
Install MySQL 8.0 by following commands
wget https://repo.mysql.com//mysql-apt-config_0.8.10-1_all.deb
-
dpkg -i mysql-apt-config_0.8.10-1_all.deb
-
apt-get update
-
apt-get install mysql-server
Composer
$ php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
$ php composer-setup.php --version=1.10.16
mv composer.phar /usr/local/bin/composer
Note: The composer version may vary as per magento version.
Disable old version php and enable new latest
- a2dismod php7.2
- a2enmod php7.4
Install Elasticsearch by the following commands
- apt-get -y update
- apt-get install -y openjdk-8-jdk
- java -version
- curl -fsSL https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add –
- echo “deb https://artifacts.elastic.co/packages/7.x/apt stable main” | sudo tee -a /etc/apt/sources.list.d/elastic-7.x.list
- apt update
- sudo apt install elasticsearch
- Configure Apache and Elasticsearch
Now you can install Magento 2.4 by following the urls.
Install Magento and Installing Magento2.4
Thanks for reading.
4 comments
Thanks for the appreciation. For any further queries email us at [email protected] and we will assist you accordingly.
Thank You