下载Composer包,任意目录下(安装前必须安装了php):
curl -sS https://getcomposer.org/installer | php
安装Compose,将composer移到bin下以便全局安装:
mv composer.phar /usr/local/bin/composer
查看安装Composer是否成功
composer -v
如果出现版本号说明安装成功。
设置中国镜像
composer config -g repo.packagist composer https://packagist.phpcomposer.com
https://getcomposer.org/download/