How to Install Magento 2 using command line?

Install Magento 2 using command line using below command:

magento setup:install --base-url=localhost/magento2/ \
--db-host=DB_HOST --db-name=DB_NAME --db-user=DB_USER --db-password=DB_PASSWORD \
--admin-firstname=FIRST_NAME --admin-lastname=LAST_NAME --admin-email=YOUR_EMAIL \
--admin-user=USER_NAME --admin-password=PASSWORD --language=en_US \
--currency=USD --timezone=America/Chicago --use-rewrites=1 \
--search-engine=elasticsearch7 --elasticsearch-host=ELASTIC_SEARCH_HOST_NAME \
--elasticsearch-port=9200

Leave a Reply

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

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>