1.下载最新composer
1 wget -c https://getcomposer.org/composer.phar
2.可执行权限
1 chmod u+x composer.phar
3.放置到安装文件夹
mv composer.phar /usr/local/bin/composer
4.执行命令,出现欢迎界面即成功。
composer
5.版本更新
composer selfupdate
6.全局配置依赖包国内镜像地址
composer config -g repositories.packagist composer http://packagist.phpcomposer.com
7.安装依赖包(guzzlehttp)
composer require guzzlehttp/guzzle
原文:http://www.cnblogs.com/esin/p/5041900.html