Table of Contents
Install Magento Open Source from its Composer repository on a supported AlmaLinux release. Pick the Magento patch first, then match PHP, Composer, the database, and search to it. The old Magento 2.3 and PHP 7.4 combination is obsolete for a new store.
1. Choose and verify the server stack
Use Adobe’s system requirements for your exact patch. Set up Apache, a compatible PHP runtime and extensions, MariaDB or another supported database, and a supported OpenSearch or Elasticsearch service. Check both the CLI PHP and the Apache PHP handler. Give Magento its own database and a local application account with privileges scoped to that database. Keep search and database services off the public network.
php -v
php -m
composer --version
sudo apachectl configtest2. Download Magento with Composer
Use an unprivileged deployment account and an appropriately owned installation directory. Choose a supported patch and supply your Commerce Marketplace authentication keys through Composer’s supported credential configuration. Keep those credentials out of version control and the web root.
composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition /var/www/magento 'VERSION'Replace VERSION with the exact patch you chose. See the Composer installation guide if the repository rejects your credentials.
3. Configure Apache and HTTPS
Set the virtual host’s DocumentRoot to /var/www/magento/pub. Use Adobe’s Apache document-root example to configure rewrites and directory access. Use narrowly scoped ownership and permissions for Magento’s writable directories and configure SELinux labels for Apache as appropriate. Do not make application files writable by everyone. Validate the Apache configuration before reloading.
Point your hostname to the server and open inbound HTTP and HTTPS in the appropriate firewall zone. Use Certbot’s Apache integration or your hosting provider’s certificate manager to issue a trusted certificate. Confirm the hostname and renewal setup before exposing the store. See how DNS resolves a hostname and how to diagnose HTTPS certificate errors.
4. Run the installer and set up cron
Change into the Magento directory as its filesystem owner and run php bin/magento setup:install --help to confirm the flags for that release. Follow Adobe’s setup:install guide for the base URL, database, search endpoint, and admin settings. Use the final HTTPS hostname, a new database, and unique secrets. Avoid exposing secrets in shell history or logs. Record the generated Admin URL privately.
cd /var/www/magento
php bin/magento cron:install
php bin/magento indexer:status
php bin/magento cache:status5. Test before launch
Verify that the storefront and Admin load over HTTPS and that the storefront can index and search a test product. Check that scheduled tasks run as the deployment user. If Admin loads without styles, check Apache’s document root, rewrite settings, and static content deployment for your selected mode. If installation cannot reach search, check the endpoint, credentials, and supported version before rerunning. The screenshots show earlier Magento interfaces.


Reader Comments 0
Sign in with email or Google to join the discussion.