https:\/\/marketplace.magento.com\/customer\/accessKeys\/<\/a> to create an access key.<\/p>\r\n\r\n\r\n\r\nOnce an access key is created, you can run this command in your SSH session.<\/p>\r\n\r\n\r\n\r\n
$ composer create-project --repository-url=https:\/\/repo.magento.com\/ magento\/project-community-edition=2.4.3 \/opt\/magento2<\/pre>\r\n\r\n\r\n\r\nRunning the command above, you will be asked for your username and password. This is the information you need to fill.<\/p>\r\n\r\n\r\n\r\n
Username: YOUR_PUBLIC_KEY Password: YOUR_PRIVATE_KEY<\/pre>\r\n\r\n\r\n\r\nPlease note, when typing or pasting the password\/private key, you would not see the password string, just paste it and hit ENTER and composer with start downloading Magento 2. Magento files will be downloaded to directory \/opt\/magento2, if you want to use another path you can edit the command above and use another location.<\/p>\r\n\r\n\r\n\r\n
Once downloaded, you can start the installation by running the command below.<\/p>\r\n\r\n\r\n\r\n
$ cd \/opt\/magento2<\/pre>\r\n\r\n\r\n\r\nBefore running the command below, you would want to edit the domain name, email address, and admin password.<\/p>\r\n\r\n\r\n\r\n
$ sudo bin\/magento setup:install \\ --base-url=http:\/\/yourdomain.com \\ --db-host=localhost \\ --db-name=magentodb \\ --db-user=magento \\ --db-password=magento \\ --admin-firstname=admin \\ --admin-lastname=admin \\ --admin-email=admin@admin.com \\ --admin-user=admin \\ --admin-password=admin123 \\ --language=en_US \\ --currency=USD \\ --timezone=America\/Chicago \\ --use-rewrites=1<\/pre>\r\n\r\n\r\n\r\nWait for the installation process until it finishes.<\/p>\r\n\r\n\r\n\r\n
You should see the following output:<\/p>\r\n\r\n\r\n\r\n
[SUCCESS]: Magento installation complete.\r\n[SUCCESS]: Magento Admin URI: \/admin_1iwnbd<\/code><\/pre>\r\n\r\n\r\n\r\n <\/figure>\r\n\r\n\r\n\r\nNow, let’s correct the permissions.<\/p>\r\n\r\n\r\n\r\n
$ sudo chown -R www.data. \/opt\/magento2<\/pre>\r\n\r\n\r\n\r\nBy default, two-factor authentication is enabled. If you want to disable it, you can run the command below<\/p>\r\n\r\n\r\n\r\n
$ sudo -u www-data bin\/magento module:disable Magento_TwoFactorAuth\r\n$ sudo -u www-data bin\/magento cache:flush<\/pre>\r\n\r\n\r\n\r\n