Follow below steps.
Step [1] – System Requirement
Operating system:
Windows 11
Linux x86-64 (such as Red Hat Enterprise Linux, CentOS, Ubuntu, Debian, etc.)
macOS (only for local development environments)
Web server:
Apache 2.4 or later
NGINX 1.18 or later
Database:
MySQL 8.0 or later
MariaDB 10.4 or later
PHP version:
PHP 8.1 or later
Required PHP extensions:
ext-bcmath
ext-ctype
ext-curl
ext-dom
ext-gd
ext-hash
ext-iconv
ext-intl
ext-mbstring
ext-openssl
ext-pdo_mysql
ext-simplexml
ext-soap
ext-xsl
ext-zip
ext-sockets
ext-xml
ext-xmlreader
ext-xmlwriter
lib-libxml (DOMDocument)
In Case XAMPP php.ini – below extensions need to be enabled.
extension=intl
extension=curl
extension=soap
extension=sockets
extension=sodium
extension=xsl
extension=zip
extension=gd
Composer / Elasticsearch
Composer 2.2 or later
Elasticsearch 7.9 or later
Step [2] – Run below script to downland Magento 2.x or Adobe Commerce Repository
composer create-project –repository-url=https://repo.magento.com/ magento/project-community-edition:2.4.x
composer create-project –repository-url=https://repo.magento.com/ magento/project-community-edition:2.4.6
composer create-project –repository-url=https://repo.magento.com/ magento/project-community-edition:2.4.6-p1
composer create-project –repository-url=https://repo.magento.com/ magento/project-community-edition:2.4.7
Step [3] – Run below CLI Script
php bin/magento setup:install –base-url=”http://dev.adobeb2b246.com” –db-host=”localhost” –db-name=”adobeb2b246p1″ –db-user=”root” –admin-firstname=”admin” –admin-lastname=”admin” –admin-email=”admin@admin.com” –admin-user=”admin” –admin-password=”admin123″ –language=”en_US” –currency=”INR” –timezone=”America/Chicago” –use-rewrites=”1″ –backend-frontname=”admin” –search-engine=elasticsearch7 –opensearch-host=localhost –opensearch-port=9200 –opensearch-index-prefix=magento2 –opensearch-timeout=15
php bin/magento setup:install
--base-url="http://dev.adobeb2b246.com"
--db-host="localhost"
--db-name="adobeb2b246p1"
--db-user="root"
--admin-firstname="admin"
--admin-lastname="admin"
--admin-email="admin@admin.com"
--admin-user="admin"
--admin-password="admin123"
--language="en_US"
--currency="INR"
--timezone="America/Chicago"
--use-rewrites="1"
--backend-frontname="admin"
--search-engine=elasticsearch7
--opensearch-host=localhost
--opensearch-port=9200
--opensearch-index-prefix=magento2
--opensearch-timeout=15
Rest of steps as per below link