To install composer globally, download and install it according to the online method:
curl -sS https://getcomposer.org/installer | php mv composer.phar /usr/local/bin/composer
then check the result
composer -V
will appear, bash: composer: command not found Installation on Unixes (Ubuntu, Debian, CentOS, etc.)
If you encounter this problem, you can put composer in the path of /usr/local/bin/,
Change to the following directory /usr/bin/.
Workaround for LINUX commands:
#
sudo mv /usr/local/bin/composer /usr/bin/composer
Then continue the test
#composer -V
It will display the correct version~