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

 

posted @ 2018-09-13 22:01  绝技小嗨皮  阅读(287)  评论(0编辑  收藏  举报
Title