安装如下 # 下载composer.phar curl -sS https://getcomposer.org/installer | php # 把composer.phar移动到环境下让其变成可执行 mv composer.phar /usr/local/bin/composer # 测试 composer -V # 输出:Composer version 1.8.4 2019-02-11 10:52:10 www.hbked.cn