1、使用命令下载
curl -sS https://getcomposer.org/installer | php
2、下载之后设置环境变量
mv composer.phar /usr/local/bin/composer
3、修改权限,否则执行会出错
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