- 下载composer
curl -sS https://getcomposer.org/installer | php
- 将composer.phar文件移动到bin目录以便全局使用composer命令
sudo mv composer.phar /usr/local/bin/composer
3.切换国内源
composer config -g repo.packagist composer https://packagist.phpcomposer.com
curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
3.切换国内源
composer config -g repo.packagist composer https://packagist.phpcomposer.com