{"id":9228,"date":"2021-08-10T04:15:36","date_gmt":"2021-08-10T04:15:36","guid":{"rendered":"https:\/\/cloudkul.com\/blog\/?p=9228"},"modified":"2023-10-19T10:04:13","modified_gmt":"2023-10-19T10:04:13","slug":"how-to-install-magento-2-4-on-ubuntu","status":"publish","type":"post","link":"https:\/\/cloudkul.com\/blog\/how-to-install-magento-2-4-on-ubuntu\/","title":{"rendered":"Learn Magento 2.4.6 Installation On Ubuntu 22.04"},"content":{"rendered":"\n<p>In this blog, <strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-black-color\">we\u2019ll learn Magento 2.4.6 Installation On Ubuntu 22.04<\/mark><span style=\"background-color:rgba(0, 0, 0, 0);color:#6d0606\" class=\"has-inline-color\">.<\/span><\/strong> You can follow more blogs for Magento 2.4 Installation on <strong><a href=\"https:\/\/cloudkul.com\/blog\/learn-magento-2-4-installation-on-windows\/\" target=\"_blank\" rel=\"noreferrer noopener\">Windows<\/a><\/strong> and <strong><a href=\"https:\/\/cloudkul.com\/blog\/how-to-install-magento-2-4-on-macos\/\" target=\"_blank\" rel=\"noreferrer noopener\">macOS<\/a><\/strong>.<\/p>\n\n\n\n<p>Regardless of whether it&#8217;s B2B or B2C, an eCommerce platform is the backbone of an online enterprise. The best eCommerce platform also promotes the mechanism of the market interaction processes with clients, workers, and customers. <\/p>\n\n\n\n<p>Therefore, you can&#8217;t survive online if you don&#8217;t have a strong e-commerce site. Thus, in widening and growing the market, the right e-commerce platform plays a very important role, like Magento. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-black-color\">What\u2019s The Magento, Exactly?<\/span><\/h2>\n\n\n\n<p>Magento is an open-source eCommerce platform that provides online shoppers with a versatile shopping cart interface. Also provides control over their online store&#8217;s look, content, and usability of their online store. <\/p>\n\n\n\n<p>Therefore, it facilitates effective marketing, optimization of search engines, and tools for catalog management.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-black-color\">Installation Requirements For Magento 2.4.6:<\/span><\/h2>\n\n\n\n<p><strong><span style=\"color:#022b5c\" class=\"has-inline-color\">Operating systems (Linux x86-64)<\/span><\/strong><\/p>\n\n\n\n<ul>\n<li>Distributions&nbsp;of&nbsp;Linux,&nbsp;including&nbsp;RedHat&nbsp;Enterprise&nbsp;Linux&nbsp;(RHEL),&nbsp;CentOS,&nbsp;Ubuntu,&nbsp;Debian,&nbsp;etc.<\/li>\n<\/ul>\n\n\n\n<p><strong><span style=\"color:#022b5c\" class=\"has-inline-color\">Memory requirement<\/span><\/strong><\/p>\n\n\n\n<ul>\n<li>Magento 2.4.6&nbsp;requires 4 GB&nbsp;or higher&nbsp;RAM.&nbsp;<\/li>\n<\/ul>\n\n\n\n<p><strong><span style=\"color:#022b5c\" class=\"has-inline-color\">Composer<\/span><\/strong><\/p>\n\n\n\n<ul>\n<li>Composer&nbsp;2.2.x&nbsp;<\/li>\n<\/ul>\n\n\n\n<p><strong><span style=\"color:#022b5c\" class=\"has-inline-color\">Web servers<\/span><\/strong><\/p>\n\n\n\n<ul>\n<li>Apache 2.4<\/li>\n\n\n\n<li>Nginx 1.x<\/li>\n<\/ul>\n\n\n\n<p><strong><span style=\"color:#022b5c\" class=\"has-inline-color\">Database<\/span><\/strong><\/p>\n\n\n\n<ul>\n<li>MySQL 8.0<\/li>\n\n\n\n<li>MariaDB 10.6<\/li>\n<\/ul>\n\n\n\n<p><strong><span style=\"background-color:rgba(0, 0, 0, 0);color:#022b5c\" class=\"has-inline-color\">PHP<\/span><\/strong><\/p>\n\n\n\n<p>Magento 2.4.0 supports PHP 7.4<\/p>\n\n\n\n<p>Magento 2.4.6 supports PHP 8.1<\/p>\n\n\n\n<p><strong><span style=\"color:#022b5c\" class=\"has-inline-color\">Elasticsearch<\/span><\/strong><\/p>\n\n\n\n<ul>\n<li>Elasticsearch 7.17<\/li>\n\n\n\n<li>Elasticsearch 2.x, 5.x, and 6.x are no longer supported by Magento<\/li>\n<\/ul>\n\n\n\n<p>To get detailed information about system requirements, just visit the mentioned link: <a href=\"https:\/\/devdocs.magento.com\/guides\/v2.4\/install-gde\/system-requirements.html\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>https:\/\/devdocs.magento.com\/guides\/v2.4\/install-gde\/system-requirements.html<\/strong><\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-black-color\">What We\u2019re Going To Use:<\/span><\/h2>\n\n\n\n<ul>\n<li><strong><span style=\"background-color:rgba(0, 0, 0, 0);color:#022b5c\" class=\"has-inline-color\">OS<\/span>:&nbsp;<\/strong>Ubuntu 22.04<\/li>\n\n\n\n<li><strong><span style=\"color:#022b5c\" class=\"has-inline-color\">SERVER<\/span>:&nbsp;<\/strong>Apache 2<\/li>\n\n\n\n<li><strong><span style=\"background-color:rgba(0, 0, 0, 0);color:#022b5c\" class=\"has-inline-color\">RAM<\/span>:&nbsp;<\/strong>4 GB <\/li>\n\n\n\n<li><strong><span style=\"background-color:rgba(0, 0, 0, 0);color:#022b5c\" class=\"has-inline-color\">PHP<\/span>:<\/strong>&nbsp;8.1<\/li>\n\n\n\n<li><strong><span style=\"background-color:rgba(0, 0, 0, 0);color:#022b5c\" class=\"has-inline-color\">MY SQL<\/span>:&nbsp;<\/strong>8.0<\/li>\n\n\n\n<li><strong><span style=\"background-color:rgba(0, 0, 0, 0);color:#022b5c\" class=\"has-inline-color\">Composer<\/span>:<\/strong> 2.2.x<\/li>\n\n\n\n<li><strong><span style=\"background-color:rgba(0, 0, 0, 0);color:#022b5c\" class=\"has-inline-color\">Elasticsearch<\/span>:<\/strong> 7.17<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><span style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-black-color\">Magento 2.4.6 Installation<\/span><\/h2>\n\n\n\n<p>So let\u2019s move to the installation part.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-black-color\">STEP 1: Log in to your Ubuntu Server<\/mark><\/strong><\/h5>\n\n\n\n<p><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-black-color\">Log in to your Ubuntu Server by executing the command mentioned below:<\/mark><\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">chmod 400 \/path to .pem file\nssh -i \".pem file\" ubuntu@ec2-ip_address.compute-1.amazonaws.com\n<\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h5 class=\"wp-block-heading\">STEP 2:<b> Install Apache2,<\/b> <strong>PHP , and its modules<\/strong><\/h5>\n\n\n\n<p>Apache,\u00a0 PHP, and its module\u00a0are\u00a0needed\u00a0for the\u00a0Magneto\u00a0backend. \u00a0Use below mentioned commands to install the packages.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo apt update\nsudo apt install apache2 \nsudo systemctl start apache2.service\nsudo systemctl enable apache2.service\nsudo apt-get install -y software-properties-common \nsudo add-apt-repository ppa:ondrej\/php \nsudo apt-get update \nsudo apt install php8.1 libapache2-mod-php8.1 php8.1-common php8.1-gmp php8.1-curl php8.1-soap php8.1-bcmath php8.1-intl php8.1-mbstring php8.1-xmlrpc php8.1-mysql php8.1-gd php8.1-xml php8.1-cli php8.1-zip<\/pre>\n\n\n\n<p><strong>Check the version of PHP,  then allow the PHP-module apache and the rewrite-apache module.<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">php -v\nsudo a2enmod php8.1\nsudo a2enmod rewrite\nsudo service apache2 restart<\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h5 class=\"wp-block-heading\"><strong>STEP 3: Install the Composer<\/strong><\/h5>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo apt install composer\n<\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h5 class=\"wp-block-heading\"><strong><span style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-black-color\">STEP 4: SSH User creation<\/span><\/strong><\/h5>\n\n\n\n<p>Presently, we were in our server\u2019s root user, but due to security issues, we do not keep our application code in the directories of the root user.&nbsp;So, we have to create another SSH user for this.<\/p>\n\n\n\n<p><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-black-color\">Create an SSH user who will be the owner of the application code. I created an SSH user with the name \u201cmagento.\u201d You can pick any name you want.<\/mark><\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo adduser magento<\/pre>\n\n\n\n<p>Eventually, this prompts a password window where you can set the password. Also, the remaining fields can be left empty by simply pressing the enter key. Additionally, after creating a user, we will switch to a new user.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\"><strong><span style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-black-color\">STEP 5: Download Magento 2.4.6 by using the composer:<\/span><\/strong><\/h5>\n\n\n\n<p>To install magento2 with composer, first,<span style=\"background-color:rgba(0, 0, 0, 0);color:#530951\" class=\"has-inline-color\"><strong> <\/strong><\/span><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-black-color\">create the Access keys of Magento marketplace. If you have an account on Magento Marketplace, simply sign in<\/mark><\/strong><span style=\"background-color:rgba(0, 0, 0, 0);color:#530951\" class=\"has-inline-color\"> <\/span>and generate the access keys. <\/p>\n\n\n\n<p>If you don\u2019t have an account, create an account by registering yourself on<strong> <a href=\"https:\/\/marketplace.magento.com\/\">marketplace.magento.com<\/a><\/strong><\/p>\n\n\n\n<p>To generate Access keys, log in to Magento marketplace,<strong> <\/strong>and from the top right corner of the page where your user name is displayed, navigate to<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-black-color\">  <strong>My profile &gt; Marketplace &gt; My products &gt; Access Keys<\/strong><\/mark><\/p>\n\n\n\n<p>After all, create a new pair of Access keys. You need to provide the public Key as a username and the Private Key as a password when prompted.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">cd \/home\/magento\nsudo composer config --global http-basic.repo.magento.com xx_your_public_key_xx xx_your_private_key_xx\nsudo composer create-project --repository-url=https:\/\/repo.magento.com\/ magento\/project-community-edition=2.4.6 magento2<\/pre>\n\n\n\n<h5 class=\"wp-block-heading\"><strong><span style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-black-color\">STEP 6: Apache configuration<\/span><\/strong><\/h5>\n\n\n\n<p>However, to support the web pages we will configure Apache.&nbsp;So, we need to switch again to the root user for configuring Apache.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo nano \/etc\/apache2\/sites-enabled\/000-default.conf\n\n<\/pre>\n\n\n\n<p>You will find the following lines as shown below, after executing the above command.<\/p>\n\n\n<div class=\"wp-block-image is-style-default\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2019\/10\/Selection_041.png\" alt=\"\"\/><\/figure><\/div>\n\n\n<p><strong>Besides that, change this to :<\/strong><\/p>\n\n\n\n<p>ServerAdmin webmaster@localhost<br>DocumentRoot \/home\/magento\/magento2<br>ServerName localhost<\/p>\n\n\n\n<p>We are using localhost but you can define your domain name<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2023\/10\/1-1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"352\" height=\"89\" src=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2023\/10\/1-1.png\" alt=\"\" class=\"wp-image-16883\"\/><\/a><\/figure><\/div>\n\n\n<p>Save it, and exit after this.<\/p>\n\n\n\n<p>Furthermore, configure the envvars file by executing the below command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo nano \/etc\/apache2\/envvars\n\n<\/pre>\n\n\n\n<p>And find these lines :<\/p>\n\n\n<div class=\"wp-block-image is-style-default\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2019\/10\/Selection_043.png\" alt=\"\"\/><\/figure><\/div>\n\n\n<p>Modify the Apache SSH username in this way :<\/p>\n\n\n\n<p>export APACHE_RUN_USER=magento<br>export APACHE_RUN_GROUP=magento<\/p>\n\n\n<div class=\"wp-block-image is-style-default\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"333\" height=\"53\" src=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2021\/01\/screenshot_from_2021_01_12_19_00_12.png\" alt=\"\" class=\"wp-image-9244\"\/><\/figure><\/div>\n\n\n<p>And configure file apache2.conf by the following command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo nano \/etc\/apache2\/apache2.conf\n\n<\/pre>\n\n\n\n<p>Although, you will find the block code shown below:<\/p>\n\n\n<div class=\"wp-block-image is-style-default\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2019\/10\/Selection_045.png\" alt=\"\"\/><\/figure><\/div>\n\n\n<p>Modify it to the following code:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p><\/p>\n\n\n\n<p>&lt;Directory \/home\/magento\/magento2\/&gt; <\/p>\n\n\n\n<p>Options FollowSymLinks <\/p>\n\n\n\n<p>AllowOverride All <\/p>\n\n\n\n<p>Require all granted <\/p>\n\n\n\n<p>&lt;\/Directory&gt;<\/p>\n<\/blockquote>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2023\/10\/new.png\"><img loading=\"lazy\" decoding=\"async\" width=\"403\" height=\"90\" src=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2023\/10\/new.png\" alt=\"\" class=\"wp-image-16914\"\/><\/a><\/figure><\/div>\n\n\n<p>Save the file then exit it, and run the below command to check if any issues &#8211; <\/p>\n\n\n\n<p>#apache2ctl -t<\/p>\n\n\n\n<p>#systemctl restart apache2<\/p>\n\n\n\n<p>Meanwhile, make some changes to the php.ini file<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo nano \/etc\/php\/8.1\/apache2\/php.ini\n\n<\/pre>\n\n\n\n<p>file_uploads = On<br>allow_url_fopen = On<br>short_open_tag = On<br>memory_limit = 256M<br>upload_max_filesize = 100M<br>max_execution_time = 360<br>date.timezone = America\/Chicago<\/p>\n\n\n\n<p>Save and exit, the php.ini file, and then run the command below:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo service apache2 restart \n\n<\/pre>\n\n\n\n<h5 class=\"wp-block-heading\"><strong><span style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-black-color\">STEP 7: <\/span><\/strong>Install MySql server <\/h5>\n\n\n\n<p><span style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-black-color\">Install MYSQL Server for database creation by executing the following commands and when a password is asked after the below two commands, simply press ENTER<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo apt-get install mysql-server\nsudo mysql -u root -p\ncreate database magento2;\nCREATE USER 'magento2user'@'localhost' IDENTIFIED BY 'magento';\nGRANT ALL ON magento2.* TO 'magento2user'@'localhost' WITH GRANT OPTION;\nflush privileges;\nexit;\n\n<\/pre>\n\n\n\n<h5 class=\"wp-block-heading\"><span style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-black-color\"><strong>STEP 8:<\/strong> Install the Elastic Search<\/span><\/h5>\n\n\n\n<p><span style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-black-color\">Similarly, Install the Elastic Search to move further<\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">apt-get install apt-transport-https\nwget -qO - https:\/\/artifacts.elastic.co\/GPG-KEY-elasticsearch | apt-key add -\necho \"deb https:\/\/artifacts.elastic.co\/packages\/7.x\/apt stable main\" | tee -a \/etc\/apt\/sources.list.d\/elastic-7.x.list\napt update &amp;&amp; apt-get install elasticsearch<\/pre>\n\n\n\n<p>After the installation of Elasticsearch, define the memory for Elasticsearch<\/p>\n\n\n\n<p>vim \/etc\/elasticsearch\/jvm.options.d\/custom.options<br>-Xms1g<br>-Xmx1g<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2023\/10\/3.png\"><img loading=\"lazy\" decoding=\"async\" width=\"397\" height=\"117\" src=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2023\/10\/3.png\" alt=\"\" class=\"wp-image-16890\"\/><\/a><\/figure><\/div>\n\n\n<pre class=\"wp-block-preformatted\">service elasticsearch start\nsysctl -w vm.max_map_count=262144  \necho \"vm.max_map_count=262144\" | tee \/etc\/sysctl.d\/elasticsearch.conf\nservice elasticsearch restart<\/pre>\n\n\n\n<h5 class=\"wp-block-heading\"><span style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-black-color\"><strong>STEP 9:<\/strong> Install\u00a0Magento\u00a02.4.6<\/span><\/h5>\n\n\n\n<p>Likewise,&nbsp;execute&nbsp;the&nbsp;commands&nbsp;below&nbsp;to&nbsp;install&nbsp;Magento&nbsp;2&nbsp;by using the required variables such as host, database&nbsp;name,&nbsp;username,&nbsp;password,&nbsp;etc.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">cd \/home\/magento\/magento2\nsudo bin\/magento setup:install --base-url=http:\/\/Public IP Address or Domain Name --db-host=localhost --db-name=magento2 --db-user=magento2user --db-password=magento --admin-firstname=Admin --admin-lastname=User --admin-email=admin@example.com --admin-user=admin --admin-password=admin123 --language=en_US --currency=USD --timezone=America\/Chicago --use-rewrites=1\n<\/pre>\n\n\n\n<p>when this command is successfully executed, the output will be identical as seen in the image below:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-style-default\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"583\" src=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2021\/01\/output-1024x583.png\" alt=\"\" class=\"wp-image-9249\"\/><\/figure>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo service apache2 restart<\/pre>\n\n\n\n<h5 class=\"wp-block-heading\"><span style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-black-color\"><strong>STEP 10:<\/strong> <\/span>Enable the rewrite module, give the permission and restart the apache2 service<\/h5>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo a2enmod rewrite \nsudo chmod -R 755 \/home\/magento\/magento2\nsudo chown -R magento:magento \/home\/magento\/magento2\nsudo systemctl restart apache2.service\n\n<\/pre>\n\n\n\n<p>The installation&nbsp;of&nbsp;Magento2&nbsp;has&nbsp;been&nbsp;successfully&nbsp;completed, go to your browser and enter the IP address of your EC2 instance or domain name.<\/p>\n\n\n\n<p> As a result, the homepage of your default eCommerce website will be like this: <\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-style-default\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"525\" src=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2021\/01\/homepage-1024x525.png\" alt=\"\" class=\"wp-image-9256\"\/><\/figure>\n\n\n\n<h5 class=\"wp-block-heading\"><strong><span style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-black-color\">STEP 11: Magento configuration<\/span><\/strong><\/h5>\n\n\n\n<p>After following all the above steps, you can now access your admin panel by using your credentials. Therefore, the admin login will open as in the image below. <\/p>\n\n\n\n<p>You can find admin login details in env.phpfile<\/p>\n\n\n\n<p>#cat \/home\/magento\/magento2\/app\/etc\/env.php<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2023\/10\/4.png\"><img loading=\"lazy\" decoding=\"async\" width=\"599\" height=\"109\" src=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2023\/10\/4.png\" alt=\"\" class=\"wp-image-16900\" style=\"aspect-ratio:5.495412844036697;width:840px;height:auto\"\/><\/a><\/figure>\n\n\n\n<p>Then you can login to &#8211; http:\/\/yourdomain\/admin_5gxvjf <\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-style-default\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"571\" src=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2021\/01\/sign-in-1024x571.png\" alt=\"\" class=\"wp-image-9257\"\/><\/figure>\n\n\n\n<p>You can&#8217;t log in to the Magento Admin Panel after installation since two-factor authentication has been implemented in Magento 2.4.6. <\/p>\n\n\n\n<p>Hence, a page similar to the one below will open.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-style-default\"><a href=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2021\/01\/mage.png\"><img loading=\"lazy\" decoding=\"async\" width=\"901\" height=\"593\" src=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2021\/01\/mage.png\" alt=\"\" class=\"wp-image-9283\"\/><\/a><\/figure>\n\n\n\n<p>Moreover, to log in, you need a working email id. Then Magento sends an email to authenticate the given email ID. <\/p>\n\n\n\n<p>In order to log in to your Magento panel, the default flow is to first disable the 2-factor authentication and later on setting up it again. <\/p>\n\n\n\n<p>Thus, we can disable 2FA by using the below command in the Magento web root directory:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#php bin\/magento module:disable Magento_AdminAdobeImsTwoFactorAuth\n\n#php bin\/magento module:disable Magento_TwoFactorAuth\n\n#sudo chmod -R 755 \/home\/magento\/magento2\n\n#sudo chown -R magento:magento \/home\/magento\/magento2<\/pre>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p><\/p>\n<\/blockquote>\n\n\n\n<p><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-black-color\">**We highly recommend you continue with 2-factor authentication**<\/mark><\/strong><\/p>\n\n\n\n<p>At last,&nbsp;the&nbsp;admin&nbsp;panel&nbsp;is&nbsp;accessible. In addition, this is what the default admin dashboard looks like.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-style-default\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"494\" src=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2021\/01\/dashboard-magento-1024x494.png\" alt=\"\" class=\"wp-image-9255\"\/><\/figure>\n\n\n\n<p>In short, your Magento 2.4.6 e-commerce platform is ready to use.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"block-4c9c8023-022d-416a-9ba1-5e080a0fecb0\"><strong><span class=\"has-inline-color has-black-color\">Thanks For Reading!<\/span><\/strong><\/h2>\n\n\n\n<p id=\"block-b20388cb-c38d-41a6-b65f-dfc7d787cdf9\">At last, we hope it works for you! And during this blog, you have found something valuable.<\/p>\n\n\n\n<p><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-black-color\">Keep in touch!!<\/mark><\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Need Support?<\/h2>\n\n\n\n<p>Thank You for reading this Blog!<\/p>\n\n\n\n<p>For further more interesting blogs, keep in touch with us. If you need any kind of support, simply raise a ticket at&nbsp;<strong><a href=\"https:\/\/webkul.uvdesk.com\/en\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/webkul.uvdesk.com\/en\/<\/a>.<\/strong><\/p>\n\n\n\n<p>You may also visit our Odoo development services and quality&nbsp;<strong><a href=\"https:\/\/store.webkul.com\/index.php\/Odoo.html\">Odoo Extensions<\/a><\/strong>.<\/p>\n\n\n\n<p><strong>For further help or queries, please&nbsp;<a href=\"https:\/\/cloudkul.com\/contact\/\">contact<\/a>&nbsp;us or raise a&nbsp;<a href=\"https:\/\/webkul.uvdesk.com\/en\/customer\/create-ticket\/\">ticket<\/a>.<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this blog, we\u2019ll learn Magento 2.4.6 Installation On Ubuntu 22.04. You can follow more <a class=\"text-primary\" title=\"read more\" href=\"https:\/\/cloudkul.com\/blog\/how-to-install-magento-2-4-on-ubuntu\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":31,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[32,2,87,20],"tags":[565,16,3,178,567,566,312,222,568,91,114,24,281,28,205,556],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Learn Magento 2.4.6 Installation On Ubuntu 22.04 - Cloudkul<\/title>\n<meta name=\"description\" content=\"To survive online, the right platform plays a significant role. In this blog, we\u2019ll learn Magento 2.4 Installation on AWS under Free-Tier.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/cloudkul.com\/blog\/how-to-install-magento-2-4-on-ubuntu\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Learn Magento 2.4.6 Installation On Ubuntu 22.04 - Cloudkul\" \/>\n<meta property=\"og:description\" content=\"To survive online, the right platform plays a significant role. In this blog, we\u2019ll learn Magento 2.4 Installation on AWS under Free-Tier.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/cloudkul.com\/blog\/how-to-install-magento-2-4-on-ubuntu\/\" \/>\n<meta property=\"og:site_name\" content=\"Cloudkul\" \/>\n<meta property=\"article:published_time\" content=\"2021-08-10T04:15:36+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-10-19T10:04:13+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2019\/10\/Selection_041.png\" \/>\n<meta name=\"author\" content=\"Bhawana Dehran\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/cloudkul.com\/blog\/how-to-install-magento-2-4-on-ubuntu\/\",\"url\":\"https:\/\/cloudkul.com\/blog\/how-to-install-magento-2-4-on-ubuntu\/\",\"name\":\"Learn Magento 2.4.6 Installation On Ubuntu 22.04 - Cloudkul\",\"isPartOf\":{\"@id\":\"https:\/\/cloudkul.com\/blog\/#website\"},\"datePublished\":\"2021-08-10T04:15:36+00:00\",\"dateModified\":\"2023-10-19T10:04:13+00:00\",\"author\":{\"@id\":\"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/1c8f54067c7f81f91da6df1534ce8d62\"},\"description\":\"To survive online, the right platform plays a significant role. In this blog, we\u2019ll learn Magento 2.4 Installation on AWS under Free-Tier.\",\"breadcrumb\":{\"@id\":\"https:\/\/cloudkul.com\/blog\/how-to-install-magento-2-4-on-ubuntu\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/cloudkul.com\/blog\/how-to-install-magento-2-4-on-ubuntu\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/cloudkul.com\/blog\/how-to-install-magento-2-4-on-ubuntu\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/cloudkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Learn Magento 2.4.6 Installation On Ubuntu 22.04\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/cloudkul.com\/blog\/#website\",\"url\":\"https:\/\/cloudkul.com\/blog\/\",\"name\":\"Cloudkul\",\"description\":\"Host your eCommerce Store on AWS with Optimized Performance\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/cloudkul.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/1c8f54067c7f81f91da6df1534ce8d62\",\"name\":\"Bhawana Dehran\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/5f035955c6c9130a5f553568a78b245c?s=96&d=https%3A%2F%2Fs.gravatar.com%2Favatar%2F6148c37469011bc2f8e491ca8f5de495%3Fs%3D80&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/5f035955c6c9130a5f553568a78b245c?s=96&d=https%3A%2F%2Fs.gravatar.com%2Favatar%2F6148c37469011bc2f8e491ca8f5de495%3Fs%3D80&r=g\",\"caption\":\"Bhawana Dehran\"},\"description\":\"Business Development Executive\",\"url\":\"https:\/\/cloudkul.com\/blog\/author\/bhawanadehran-bd033\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Learn Magento 2.4.6 Installation On Ubuntu 22.04 - Cloudkul","description":"To survive online, the right platform plays a significant role. In this blog, we\u2019ll learn Magento 2.4 Installation on AWS under Free-Tier.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/cloudkul.com\/blog\/how-to-install-magento-2-4-on-ubuntu\/","og_locale":"en_US","og_type":"article","og_title":"Learn Magento 2.4.6 Installation On Ubuntu 22.04 - Cloudkul","og_description":"To survive online, the right platform plays a significant role. In this blog, we\u2019ll learn Magento 2.4 Installation on AWS under Free-Tier.","og_url":"https:\/\/cloudkul.com\/blog\/how-to-install-magento-2-4-on-ubuntu\/","og_site_name":"Cloudkul","article_published_time":"2021-08-10T04:15:36+00:00","article_modified_time":"2023-10-19T10:04:13+00:00","og_image":[{"url":"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2019\/10\/Selection_041.png"}],"author":"Bhawana Dehran","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/cloudkul.com\/blog\/how-to-install-magento-2-4-on-ubuntu\/","url":"https:\/\/cloudkul.com\/blog\/how-to-install-magento-2-4-on-ubuntu\/","name":"Learn Magento 2.4.6 Installation On Ubuntu 22.04 - Cloudkul","isPartOf":{"@id":"https:\/\/cloudkul.com\/blog\/#website"},"datePublished":"2021-08-10T04:15:36+00:00","dateModified":"2023-10-19T10:04:13+00:00","author":{"@id":"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/1c8f54067c7f81f91da6df1534ce8d62"},"description":"To survive online, the right platform plays a significant role. In this blog, we\u2019ll learn Magento 2.4 Installation on AWS under Free-Tier.","breadcrumb":{"@id":"https:\/\/cloudkul.com\/blog\/how-to-install-magento-2-4-on-ubuntu\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/cloudkul.com\/blog\/how-to-install-magento-2-4-on-ubuntu\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/cloudkul.com\/blog\/how-to-install-magento-2-4-on-ubuntu\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/cloudkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Learn Magento 2.4.6 Installation On Ubuntu 22.04"}]},{"@type":"WebSite","@id":"https:\/\/cloudkul.com\/blog\/#website","url":"https:\/\/cloudkul.com\/blog\/","name":"Cloudkul","description":"Host your eCommerce Store on AWS with Optimized Performance","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/cloudkul.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/1c8f54067c7f81f91da6df1534ce8d62","name":"Bhawana Dehran","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/5f035955c6c9130a5f553568a78b245c?s=96&d=https%3A%2F%2Fs.gravatar.com%2Favatar%2F6148c37469011bc2f8e491ca8f5de495%3Fs%3D80&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5f035955c6c9130a5f553568a78b245c?s=96&d=https%3A%2F%2Fs.gravatar.com%2Favatar%2F6148c37469011bc2f8e491ca8f5de495%3Fs%3D80&r=g","caption":"Bhawana Dehran"},"description":"Business Development Executive","url":"https:\/\/cloudkul.com\/blog\/author\/bhawanadehran-bd033\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/posts\/9228"}],"collection":[{"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/users\/31"}],"replies":[{"embeddable":true,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/comments?post=9228"}],"version-history":[{"count":107,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/posts\/9228\/revisions"}],"predecessor-version":[{"id":16935,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/posts\/9228\/revisions\/16935"}],"wp:attachment":[{"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/media?parent=9228"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/categories?post=9228"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/tags?post=9228"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}