Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save brettalton/98ed6c578be67078d778 to your computer and use it in GitHub Desktop.
Save brettalton/98ed6c578be67078d778 to your computer and use it in GitHub Desktop.
How to install Composer globally using MAMP's PHP
# 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