1、下载指定版本composer.phar文件:https://github.com/composer/composer/releases
2、将下载的文件添加到全局路径:
bash
sudo mv composer.phar /usr/local/bin/composer
3、赋予权限:
bash
sudo chmod +x /usr/local/bin/composer
4、查看composer版本:
bash
composer --version