Skip to content

Instantly share code, notes, and snippets.

@aarthiathi
Last active April 24, 2017 23:11
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aarthiathi/2be887eed3b3b460c8909e09d88de719 to your computer and use it in GitHub Desktop.
Save aarthiathi/2be887eed3b3b460c8909e09d88de719 to your computer and use it in GitHub Desktop.
magento installation on localhost ( Mac OS)
MAC OS + MAMP+ MAGENTO - INSTALLATION
Download MAMP from https://www.mamp.info/en/downloads/.
Install the MAMP
Before starting the MAMP server, we need to do something regarding the selection of the php version. I am planning on installing Magento , and it requires PHP 5.6 version of PHP for the composer to be installed successfully.
So , let's do a workaround.
Go to MAMP/bin/php/( to view the php versions installed), tweak and rename all the folder's except the php5.60 folder and then we will be able to select this as a default php version. Change the folder name for the php7.1 and php 7.05 versions i.e append a text to the front of the php 7.05 version ( 'testphp7.05') to it.So now when you open MAMP, you can see the PHP versions 5.6 available for selection, if you want to swap bwtween another version of php, you can have the same folder name.
Now for the composer :
nano ~/.bash_profile
alias phpmamp='/Applications/MAMP/bin/php/php5.4.10/bin/php'
curl -sS https://getcomposer.org/installer | phpmamp
sudo mv composer.phar /usr/local/bin/composer
composer
.bash_profile contents //BELOW\\
PHP_VERSION=`ls /Applications/MAMP/bin/php/ | sort -n | tail -1`
export PATH=/Applications/MAMP/bin/php/${PHP_VERSION}/bin:$PATH
alias composer="php /usr/local/bin/composer.phar"
Then check which php version is running....
in the cli -
>which php
you should get the path to the php5.6 path set.
>cli > source ~/.bash_profile
I came across a problem that the apache did not start, that was because the port configured for php was 80 and it is another application that is using the port.So i did a quick search using the cmd
>sudo lsof -i -n -P | grep TCP
and found that someother user was using that port.
-------------------------------------------------------------------------------------------------------------------------
One important issue - never change the phpmyadmin user accounts - password, i had to redo everything...bec i could not find a solution as of now.( Will let you know if i get a solution).
---------------------------------------------------------------------------------------------------------------------------
Download the magento community version and install in into htdocs.
Then in the cli , go to the magento folder and run the command
>composer install
It will check for the dependencies an then you need to run
>composer init
it will create the composer.json file, which will hold some basic config , autoload settings.
Now browse the url from localhost -> localhost/newMag(Magento folder), you will be redirected to the setup dir.
and you are done with it.
@aarthiathi
Copy link
Author

Change the file permissions of the downloaded magento2

find . -type d -exec chmod g+ws {} ;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment