1、使用命令下载
代码语言:javascript复制curl -sS https://getcomposer.org/installer | php
2、下载之后设置环境变量
代码语言:javascript复制mv composer.phar /usr/local/bin/composer
3、修改权限,否则执行会出错
代码语言:javascript复制chmod -R 777 /usr/local/bin/composer
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
chmod -R 777 /usr/local/bin/composer