1、下载composer
curl -sS https://getcomposer.org/installer | php
2、将composer.phar文件移动到bin目录,以便全局使用composer命令
mv composer.phar /usr/local/bin/composer
3、切换镜像源
取消全局设置:composer config -g --unset repo.packagist
更换镜像源:composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
4、输入composer验证
5、测试,使用composer下载thinkphp
composer create-project topthink/think tp
详见:https://www.cnblogs.com/lamp01/p/6934257.html
https://www.cnblogs.com/chenyingying0/p/13598468.html
https://www.kancloud.cn/manual/thinkphp6_0/1037481