安装 Composer
wget https://dl.laravel-china.org/composer.phar -O /usr/local/bin/composer
chmod a+x /usr/local/bin/composer
Composer 镜像加速
一、全局配置
composer config -g repo.packagist composer https://packagist.laravel-china.org
二、局部配置(仅限当前工程使用镜像,去掉 -g 即可)
composer config repo.packagist composer https://packagist.laravel-china.org
全局配置信息查看, [repositories.packagist.org.url] 表示当前镜像地址
composer config -gl
取消镜像
composer config -g --unset repos.packagist
查看当前 composer 版本
composer -v
升级 composer 版本
composer selfupdate

oceandlnu
42 声望0 粉丝

人生苦短,我用manjaro