Menu Close
    Start a Project Request quote Reading list Switch to dark mode

    Magento2 setup in MacOSX

    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 composer

    Using file archive

    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

    export PATH=/Applications/MAMP/bin/php/php7.0.0/bin:$PATH

    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

    Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 24 bytes) in \vendor\zendframework\zend-code\src\Scanner\FileScanner.php on line 36

    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 .



    . . .


    Add Your Comment

    Be the first to comment.

    Back to Top
    Hire Us!
    Brief us about your requirements and we'll get back to you.
    Woo! Hooy!
    We have just recieved your project brief and our expert will contact you shortly.
    Send Again