## 安装 composer
### 1. 执行以下命令
> 参考 https://getcomposer.org/download/
```
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === '48e3236262b34d30969dca3c37281b3b4bbe3221bda826ac6a9a62d6444cdb0dcd0615698a5cbe587c3f0fe57a54d8f5') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"
```
### 2. 使 composer 在全局环境中都可用
```
mv composer.phar /usr/local/bin/composer
```
参考
http://www.cnblogs.com/ios8/p/Mac-OSX-keyword-cmd.html