Step 1:进入安装目录
cd /usr/local/bin
Step 2:下载并安装
sudo curl -s https://getcomposer.org/installer | sudo php
Step 3:添加执行权限
sudo chmod a+x composer.phar
Step 4:加入全局命令:
mv composer.phar /usr/local/bin/composer
Step 5:更新,查看版本号
sudo composer.phar self-update
查看版本号
composer --version