composer 使用提示
1.使用国内镜像【推荐】
composer config -g repo.packagist composer https://mirrors.cloud.tencent.com/composer/
或者
composer config -g repo.packagist composer https://repo.huaweicloud.com/repository/php/
或者
composer config -g repo.packagist composer https://packagist.phpcomposer.com
或者
composer config -g repo.packagist composer https://packagist.laravel-china.org
或者
composer config -g repo.packagist composer https://pkg.phpcomposer.com
或者
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
2.取消配置
composer config -g --unset repos.packagist
3.版本约束
http://composer.p2hp.com/doc/articles/versions.html
Linux 安装composer
1、下载composer.phar
curl -sS https://getcomposer.org/installer | php
2、全局调用
1 mv composer.phar /usr/local/bin/composer 2 chmod +x composer
3、测试安装结果
composer about
正因为来之不易,所以才有了后来的倍加珍惜。