0

I got this example command from the guide (tutorial) - https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli.html#install-cli-example

bin/magento setup:install --base-url=http://127.0.0.1/magento2/ \
--db-host=localhost --db-name=magento --db-user=magento --db-password=magento \
--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=es-host.example.com \
--elasticsearch-port=9200

I also have elasticsearch running.
But I have a doubt that host.example.com should be something good value(I am trying to install magento on localhost ) is it correct or not, if i copy paste the above command and run.. This below line elasticsearch-host=es-host.example.com should be elasticsearch-host=es-host.localhost.com .
I don't know if I am right or wrong, but please help me in proceeding further, any help will be great help.

3
  • My doubt - Elasticsearch 7 is installed on es-host.example.com and connects on port 9200 - Should i change es-host.example.com to something else or use it as it is. Commented May 20, 2021 at 18:13
  • did you try without --search-engine, --elasticsearch-host & --elasticsearch-port and check your Elastic Search configuration in Stores -> Settings -> Configuration -> Catalog -> Catalog -> Catalog Search -> Test Configuration ? works for me but not tested locally Commented May 20, 2021 at 18:50
  • 1
    Try to use --elasticsearch-host=localhost Commented May 20, 2021 at 19:35

1 Answer 1

1

Finally this one worked for me.

bin/magento setup:install --base-url=http://127.0.0.1/local_m241/lcl_m241/ --db-host=localhost --db-name=magento --db-user=magento --db-password=magento --admin-firstname=Vibhore_admin --admin-lastname=Jain_admin [email protected] --admin-user=admin --admin-password=admin123 --language=en_US --currency=USD --timezone=America/Chicago --use-rewrites=1 --search-engine=elasticsearch7 --elasticsearch-host=localhost --elasticsearch-port=9200

A saw a video here and got some hint here (https://www.youtube.com/watch?v=0013vPjz_xE ) to open elastic search in browser as http://localhost:9200/ which shows a JSON object lol. -
I appreciate Amit comment as it was also correct but I saw it after I already solved it.
Thanks Amit anyways.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.