CentOS Composer的安装
下载 composer.phar
curl -sS https://getcomposer.org/installer | php
把 composer.phar 移动到环境下让其变成可执行
mv composer.phar /usr/local/bin/composer
切换 www 用户:如果没有则创建useradd www
sudo su - www -s /bin/bash
换中国镜像,使用阿里云的源
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer
对 composer 进行升级
composer self-update