First you have to go to the /tmp directory

cd /tmp

Download the composer.phar file

curl -sS https://getcomposer.org/installer | php

Move it to /usr/local/bin/

mv composer.phar /usr/local/bin/composer

Now you can to use the command composer globally.