Composer is a PHP dependency manager. To install it globally on CentOS follow the steps below.
First, 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 should be able to use the command
composer
globally.