安装方式
1. Linux在线命令安装
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
2. 直接下载安装
最新版下载地址:https://getcomposer.org/composer.phar
wget -c https://getcomposer.org/composer.phar
mv composer.phar /usr/local/bin/composer
chmod +x /usr/local/bin/composer
3. 升级
composer self-update
Packagist 中国镜像
- 系统全局配置(推荐方式)
composer config -g repo.packagist composer https://packagist.phpcomposer.com
- 单个项目配置
composer config repo.packagist composer https://packagist.phpcomposer.com
网友评论