Magento2 setup in MacOSX – In this tutorial we will explain you can setup magento2 using Mac. OS X El Capitan .Well its fairly easy but still there are few tweaks which need to be sorted out . As i am using MAMP basic with PHP7 support so almost all the dependency of the like curl mcrypt and others which you will find during the setup of php 5.x.x .
As MAMP comes with mysql 5.5 so you need to upgrade it to 5.6 , You may use this script for the upgrade
There are two ways to install magento2 in macosx
Using file archive
Magento 2 Company ? Read More
In this tutorial we will download the setup from magento site and will extract it under htdocs folder under Application/MAMP as per the screenshot
now simply go to the browser and setup the database and setup configuration and you are done .
Well if you think all done actually its not this is just a start . Now suppose you are going to start a module development using the same platform setup and you run the following command . As i run the magento2 compilation command it generate the following error
Use of undefined constant MCRYPT_BLOWFISH
it should not be there as php7 already support that well its been quite a pain for me but finally i got the issues when i typed the command
php-v i came to know that php version is still displaying 5.x.x WTH why its there as my MAMP setup is still php7
so what i did i created a .bash_profile under my home directory and added the path of php7 as below
make sure after saving the file you execute “source .bash_profile” command and make sure you are not getting an error
well now you mcrypt issues must be solved
Now i execute again the command “php bin/magento setup:di:compile” again this time got the
This issue was because of less memory allocation in php.ini file which you can over come by simply running through command line
“php -dmemory_limit=1G bin/magento setup:di:compile” but its a temporary solution you can edit it in php.ini and it will work perfectly ok .