- 下载composer.phar
// 如果是网络原因失败,多试几次
curl -sS https://getcomposer.org/installer | php
- 把composer.phar移动到环境下让其变成可执行
mv composer.phar /usr/local/bin/composer
- 测试
composer -v
- 修改镜像地址
composer config -g repo.packagist composer https://packagist.phpcomposer.com
网友评论