安装composer $ sudo apt-get update $ sudo apt-get install wget 下载composer.phar $ wget https://getcomposer.org/composer.phar 或者 $ curl -O https://getcomposer.org/composer.phar 重命名文件composer.phar 为 composer $ mv composer.phar composer $ chmod +x composer 现在可以通过./composer 命令运行composer,但这只仅限于在当前目录运行。要想