卸载composer
apt-get remove composer
下载composer.phar
wget https://getcomposer.org/composer.phar
重命名composer.phar为composer
mv composer.phar composer
增加可执行权限
chmod +x composer
加入全局命令
mv composer /usr/bin/composer
升级命令
composer self-update
执行诊断命令
composer diagnose
清除缓存
composer clear
更新+更新lock文件
composer update --lock
切换为阿里云的源加速
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/