centos 安装composer
1、使用命令下载
curl -sS https://getcomposer.org/installer | php
2.下载之后设置环境变量
mv composer.phar /usr/local/bin/composer
如果php版本是7,这样输入composer会报错 :/usr/bin/env: php: No such file or directory
解决方法
cd usr/bin
cp php73 php
在输入composer就好了
3.修改权限,否则执行会出错
chmod -R 777 /usr/local/bin/composer
4.修改镜像地址为阿里云
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
5.验证
composer -v
标签:bin,https,centos,usr,composer,php,安装 From: https://www.cnblogs.com/goodgongdstudy/p/16838804.html