OSX安装composer

一、安装命令

$ curl -sS https://getcomposer.org/installer | php

$ sudo mv composer.phar /usr/local/bin/composer

$ composer --version

Composer version 1.7.2 2018-08-16 16:57:12

 

二、更换为国内阿里云的composer镜像地址

1)全局配置/取消

#composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/

#composer config -g --unset repos.packagist

2)局部更换

#composer config repo.packagist composer https://mirrors.aliyun.com/composer/

#composer config --unset repos.packagist

 

三、下载个Laravel框架试试阿里云composer镜像的速度

#cd /Users/apple/Documents/Workspace/PhpstormProjects

#composer -vvv create-project laravel/laravel myapp-1

说明:-vvv命令用于输出详细信息,laravel/laravel表示要下载的镜像名称,myapp-1表示项目的存放文件夹

 

posted @ 2019-07-24 21:44  巅峰键盘侠  阅读(198)  评论(0编辑  收藏  举报