I'm trying to install a fresh Magento 2.4 CE on my local PC.
Here are my configurations:
- Magento 2.4 CE
- Apache 2.4.41 (Ubuntu)
- PHP 7.4.8 (cli)
- mysql Ver 8.0.21 for Linux on x86_64 (MySQL Community Server - GPL)
- Ubuntu 20.04 LTS
I'm trying to install using CLI with this command:
php bin/magento setup:install
--backend-frontname="admin"
--key="240d2e12f0f04fdd2dfd2a9bd616b1f6"
--session-save="files"
--db-host="localhost:9200"
--db-name="magento24"
--db-user="root"
--db-password="admin123"
--base-url="http://127.0.0.1/magento24/"
--base-url-secure="https://127.0.0.1/magento24/"
--admin-user="admin"
--admin-password="admin123"
--admin-email="[email protected]"
--admin-firstname="admin"
--admin-lastname="khan"
I am getting error Here
In SearchConfig.php line 81:
Could not validate a connection to Elasticsearch. No alive nodes found in your cluster
2 Answers 2
As per Magento documentation, you must install ElasticSearch first before installing Magento.
Easiest way to run it in local environment is with Docker. Here's a guide for that: Install ElasticSearch with Docker
You must enable ElasticSearch in Magento 2.4, it's a requirement as you can see in the page Magento 2.4 technology stack requirements.
The issue is the ElasticSearch missing in your command.
To start the verification, you can run this curl command below to validate your ElasticSearch, you can change the host elasticsearch to your host.
curl elasticsearch:9200
Install again
Then you can install it again using this command below.
php bin/magento setup:install
--backend-frontname="admin"
--key="240d2e12f0f04fdd2dfd2a9bd616b1f6"
--session-save="files"
--db-host="localhost:9200"
--db-name="magento24"
--db-user="root"
--db-password="admin123"
--base-url="http://127.0.0.1/magento24/"
--base-url-secure="https://127.0.0.1/magento24/"
--admin-user="admin"
--admin-password="admin123"
--admin-email="[email protected]"
--admin-firstname="admin"
--admin-lastname="khan"
--elasticsearch-host=elasticsearch
-
I did the all above and also install elastic search after that I get a new error in xampp i,e "Current version of RDBMS is not supported. Used Version: 10.1.37-MariaDB. Supported versions: MySQL-8, MySQL-5.7, MariaDB-(10.2-10.4)" now I update the MySQL version also and setup button is still not appearing.kantsverma– kantsverma2020年09月30日 07:34:47 +00:00Commented Sep 30, 2020 at 7:34
-
In this version, there is no setup button, as you already upgrade the MySQL version, you need to run the command via terminal again.Rafael Corrêa Gomes– Rafael Corrêa Gomes2020年09月30日 20:12:18 +00:00Commented Sep 30, 2020 at 20:12
-
Which command? Setup command I do that but there are showing errors and waring. I solved many like install elastic search then upgrade MySQL version but still showing error in the console.kantsverma– kantsverma2020年10月04日 16:04:41 +00:00Commented Oct 4, 2020 at 16:04
-
@kantsverma the command in my answer, which error are you having?Rafael Corrêa Gomes– Rafael Corrêa Gomes2020年10月05日 18:23:32 +00:00Commented Oct 5, 2020 at 18:23
-
For me, adding --elasticsearch-host=elasticsearch --elasticsearch-port=9200 worked for me in dockrShyam– Shyam2020年12月30日 17:07:27 +00:00Commented Dec 30, 2020 at 17:07