- Change directory to tmp.
cd /tmp
- Download the composer.phar file.
curl -sS https://getcomposer.org/installer | php
- Move to bin.
mv composer.phar /usr/local/bin/composer
- To run composer anywhere, create the alias.
alias composer='/usr/local/bin/composer'
- Try to execute.
composer -v