Composer is a PHP dependency manager. To install it globally on CentOS follow the steps below.
First, go to the /tmp directory
Download the composer.phar file
curl -sS https://getcomposer.org/installer | php
Move it to
mv composer.phar /usr/local/bin/composer
now you should be able to use the command