系统全局配置:
可以使用 composer config -l -g
查看所有全局配置
composer config -l -g
Composer
镜像使用帮助
切换镜像指向:
composer config -g repos.packagist composer https://mirrors.tencent.com/composer/
Composer
安装简明教程:
一、下载:
wget https://mirrors.tencent.com/composer/composer.phar
二、安装:
mv composer.phar /usr/local/bin/composer
取消全局镜像源配置:
composer config -g --unset repos.packagist
取消当前镜像源配置:
composer config --unset repos.packagist
composer
镜像源管理工具
https://github.com/slince/composer-registry-manager
安装 > Install via composer
composer global require slince/composer-registry-manager ^2.0
镜像源列表 > List all available repositories
$ composer repo:ls --- ------------- ------------------------------------------------ ------------------------------
composer https://packagist.org Europe, Canada and Singapore
aliyun https://mirrors.aliyun.com/composer China
tencent https://mirrors.cloud.tencent.com/composer China
* huawei https://mirrors.huaweicloud.com/repository/php China
cnpkg https://php.cnpkg.org China
sjtug https://packagist.mirrors.sjtug.sjtu.edu.cn China
phpcomposer https://packagist.phpcomposer.com China
kkame https://packagist.kr South Korea
hiraku https://packagist.jp Japan
webysther https://packagist.com.br Brazil
solidworx https://packagist.co.za South Africa
indra https://packagist.phpindonesia.id Indonesia
varun https://packagist.in India
--- ------------- ------------------------------------------------ ------------------------------
切换源地址 > Switch repository
$ composer repo:usePlease select your favorite repository (defaults to composer) [composer]:
[0 ] composer
[1 ] aliyun
[2 ] tencent
[3 ] huawei
[4 ] cnpkg
[5 ] sjtug
[6 ] phpcomposer
[7 ] kkame
[8 ] hiraku
[9 ] webysther
[10] solidworx
[11] indra
[12] varun
>
直接使用名称选择镜像源地址 You can also skip selection by giving repository name.
$ composer repo:use aliyun
其他命令 > Available commands
Use the following command for help.
$ composer repo
_____ _____ ___ ___
/ ___| | _ \ / |/ |
| | | |_| | / /| /| |
| | | _ / / / |__/ | |
| |___ | | \ \ / / | |
\_____| |_| \_\ /_/ |_|Composer Repository Manager version 2.0.0Usage:
command [options] [arguments]Options:
-h, --help Display this help message
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debugAvailable commands for the "repo" namespace:
repo:add Creates a repository
repo:ls List all available repositories
repo:remove Remove a repository
repo:use Change current repository
发表评论 取消回复