1、下载composer.phar
curl -sS https://getcomposer.org/installer | php
2、把composer.phar移动到环境下让其变成可执行
mv composer.phar /usr/local/bin/composer
3、换中国镜像
composer config -g repo.packagist composer https://packagist.phpcomposer.com