Created
August 3, 2019 17:48
-
-
Save dospuntocero/95941beb334990c3ffd9cfc3fa613ff3 to your computer and use it in GitHub Desktop.
install composer globally using mamp's PHP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Create an alias for our bash profile. | |
Within the terminal, run: | |
nano ~/.bash_profile | |
add the following line: | |
alias phpmamp='/Applications/MAMP/bin/php/php7.3.1/bin/php' | |
you must use the version of php you currently use with your mamp installation | |
run the following command in the terminal: | |
curl -sS https://getcomposer.org/installer | phpmamp | |
Note that instead of the standard 'php' , we are use 'phpmamp' to use the MAMP installation of PHP. | |
to make this available globally, so we need to move the file to '/usr/local/bin/composer'. | |
To do this, run the following command: | |
sudo mv composer.phar /usr/local/bin/composer | |
Terminal will ask you for yor password, after entering it and pressing the 'return' (or enter) key, you'll have a working global installation of composer on your mac that uses MAMP! | |
You can verify your installation worked by typing the following command: | |
composer | |
that's it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment