just move the composer file (in case you already downloaded composer file) from where you've downloaded to the following Path /usr/local/bin/
then change your composer.phar to composer through this command mv composer.phar composer then type composer to get installed.
$composer