centos7安装composer

Composer
594
0
0
2022-04-13

使用命令下载

url -sS getcomposer.org/installer | php

下载之后设置环境变量

mv composer.phar /usr/local/bin/composer

修改权限,否则执行会出错

chmod -R 777 /usr/local/bin/composer

接着输入命令,就会显示下图就是安装成功

composer -v

使用阿里镜像

composer config -g repo.packagist composer mirrors.aliyun.com/composer/

取消配置还原到默认的地址

composer config -g –unset repos.packagist

查看全局设置:composer config -gl