Forked from kkirsche/Install Composer to use MAMP's PHP.md
Last active
October 12, 2017 13:50
-
-
Save brettalton/98ed6c578be67078d778 to your computer and use it in GitHub Desktop.
How to 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
# Tested with Mac OS X 10.11.2 El Capitan & MAMP 3.5 | |
# Jan 17, 2016 | |
# original gist: https://gist.github.com/kkirsche/5710272 | |
########################################### | |
# Composer & MAMP's installation of PHP 7 # | |
########################################### | |
echo "alias phpmamp='/Applications/MAMP/bin/php/php7.0.0/bin/php'" >> ~/.bash_profile | |
source ~/.bash_profile | |
curl -sS https://getcomposer.org/installer | phpmamp | |
sudo mv composer.phar /usr/local/bin/composer | |
# Composer is now installed globally and can be used via 'composer' on the command line, | |
# as well as MAMP's installation of PHP 7 is available using 'phpmamp' | |
################################ | |
# MAMP's installation of MySQL # | |
################################ | |
echo "alias mysqlmamp='/Applications/MAMP/Library/bin/mysql'" >> ~/.bash_profile | |
source ~/.bash_profile | |
# MAMP's MySQL installation is now available on the command line under 'mysqlmamp' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment