安装compsoer
# 下载安装脚本
$ php -r "readfile('https://getcomposer.org/installer');" > composer-setup.php
# 执行安装脚本
$ php composer-setup.php
# 删除安装脚本
$ php -r "unlink('composer-setup.php');"
全局安装
$ sudo mv composer.phar /usr/bin/composer
Packagist/Composer 国内镜像
系统全局配置命令
$ composer config -g repo.packagist composer https://packagist.phpcomposer.com
Composer更新命令
$ composer self-update