在 Linux 和 Mac OS X 中可以运行如下命令:


curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer

在 Windows 中,你需要下载并运行

https://getcomposer.org/Composer-Setup.exe