composer for Ubuntu
2020-11-03 本文已影响0人
Robii
OS:ubuntu 20.10 composer 2.0.4
1.下载最新composer
wget -c https://getcomposer.org/composer.phar
【以下是阿里云地址】
wget -c https://mirrors.aliyun.com/composer/composer.phar
2.可执行权限
chmod u+x composer.phar
3.放置到安装文件夹
mv composer.phar /usr/local/bin/composer
4.执行命令,出现欢迎界面即成功。
composer
5.版本更新
composer self-update
6.全局配置依赖包国内镜像地址
composer config -g repositories.packagist composer http://packagist.phpcomposer.com
【以下是阿里云地址】
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
7.安装依赖包(guzzlehttp)
composer require guzzlehttp/guzzle