You can skip this step if you’ve already installed the Composer.
Make Composer Globally Available
If you wish, you can additionally install Composer globally so you don’t have to type php/path/to/composer.phar every time. The Windows installer will automatically set up the PATH system variable.
Download Magento 2
Run the following command in the root directory.
Magento 2.4.2 Changes
Issue: The [magento_root]/index.php file has been removed, and Magento now runs from /pub by default for Apache configurations. Stores that are served from subfolders will not work as expected and may display 404 errors. Workaround: Use symlinks to emulate the installation of Magento into a subfolder.
https://devdocs.magento.com/guides/v2.4/release-notes/open-source-2-4-2.html#known-issues
https://devdocs.magento.com/guides/v2.4/install-gde/tutorials/change-docroot-to-pub.html
You can get message about missing libraries, following you will require:
ext-mbstring
ext-gd
ext-mcrypt
ext-bcmath
ext-curl
ext-intl
ext-zip
ext-soap
You can install them with following command:
Set Up Permissions
After all the dependencies are retrieved, you should set the correct permissions on the entire Magento 2 installation directory. The official documentation recommends chmod’ing all directories to 700 and all files to a level of 600, however that didnt work for me.
Create The Database
Magento 2.4.x - CLI install
See https://www.emizentech.com/blog/magento-2-4-with-elasticsearch-complete-guide.html for complete tutorial.
You can disable TwoFactor Authorization for localhost.
Magento 2.4.x is using ElasticSearch. You can turn it off but then product view will not work, so its better install it
Edit /etc/elasticsearch/elasticsearch.yml:
After Magento installation you can configure ElasticSearch in Magento (this isnt required for local).
Store -> Settings -> Configuration -> Catalog -> Catalog -> Catalog Search -> Search Engine
From Magento 2.4.x you need to install it from command line.
After Installation
If you dont see styles, check paths in sourcode. If you have there something like /version…./ run following querty
Admin not working
in file /etc/apache2/apache2.conf make sure you have AllowOverride All
Admin not working - redirect issue
To correct this, please try to set Use Secure URLs in Admin to true, in System -> Config -> General -> Web.
Clear cache with magerun
Deploy content
Upgrade and compile (if you are adding some new modules with composer)