MacOS Install Composer globally

Download and Install Composer

curl -sS https://getcomposer.org/installer | php
php composer.phar install
mv composer.phar /usr/local/bin/composer

Add alias to composer

nano  ~/.bash_profile
alias composer="php /usr/local/bin/composer"
nano  ~/.zshrc

Use composer globally

composer install