Option 1: Install Magento 2 with Composer
1) Install Composer
Magento Local: MAMP or Vagrant – 28 Blogs Later, Day 5. Trying to use Magento local with MAMP has been impossible. Of all the systems I've developed locally, Magento has got to be the hardest. Even Drupal was easier to configure locally. And that's saying something. Vagrant to the rescue. Published in Technology. I have extracted the ZIP files and pasted them into the MAMP/htdocs/magento directory; When I navigate to 127.0.0.1/magento/ I get the following error: The requested URL /magento/ was not found on this server. Apache/2.2.22 (Unix) DAV/2 Server at 127.0.0.1 Port 80. I do not have a PRO version of MAMP so it is the only thing I can think of. That's good news for developers who want to install Magento 2 locally. Today I am going to walk thru an install of Magento 2.15 using Mamp Pro v4.1, which is using MySQL 5.6.34 and PHP 7.0.13 as part of configuration. (update: Magento 2.3.0 will need to have php 7.2.x or above enabled on MAMP in order to function properly). MAMP for Windows MAMP is a free, local server environment that can be installed under macOS and Windows with just a few clicks. MAMP provides them with all the tools they need to run WordPress on their desktop PC for testing or development purposes, for example. You can even easily test your projects on mobile devices. Re: problems installing magento2 locally (MAMP) if your're in the root folder of your magento project you need to add 'bin' to the command. Either of these commands should work: /Applications/MAMP/bin/php/php7.0.20/bin/php./bin/magento indexer:reindex.
The first step is to install Composer if you haven't already.
2) Install Magento
Run the following to install the version of Magento you would like. In our example below we are installing version 2.3.4.
3) Install Sample Data (optional)
For testing and demo purposes you can install the sample data. Do not run this for development of a site you will be using since you cannot uninstall the sample data. (Requires running with PHP 7+)
3) Run the Setup
Wizard Option for Setup
You can do this with the web setup wizard by going to your Magento URL and following the steps on screen. One note here is make sure to run this using Chrome incognito or your browser of choice's private browsing option as if you have run this before, Magento will auto fill some options and cause errors such as 'Unable to enable modules because of the following constraints: …' Also of note, I've had issues with this method where the progress bar get stuck at a percentage. If so, let it run for a little while to make sure it does in fact seem stuck after which it might have actually completed so try visiting your site to see if it's working. See Magento 2 Install Stuck at 73% from Magento Stack Exchange for more details.
Command Line Option for Setup
The recommended method would be to run via command line using the command below. Update any text like with the value you want to set.
Magento Amp
If you find you are running into memory limits when running bin/magento, you will probably need to prefix all these commands with something like…
Mamp Magento 2
Option 2: Install Magento 2 with Git
Magento Sample Sites
Follow the github version of this: https://inchoo.net/magento-2/how-to-install-magento-2/