用curl -sS https://getcomposer.org/installer | php 安装composer出现如下错误 Failed to connect to getcomposer.org port 443: Connection timed out 于是找到以下方法便安装成功
//下载安装脚本 - composer-setup.php - 到当前目录 php -r "copy('https://install.phpcomposer.com/installer', 'composer-setup.php');" //执行安装过程。 php composer-setup.php mv composer.phar /usr/local/bin/composer //删除安装脚本 php -r "unlink('composer-setup.php');"
更换Packagist中国全量镜像,修改 composer 的全局配置文件
composer config -g repo.packagist composer https://packagist.phpcomposer.com