您的位置:首页 > 编程语言 > PHP开发

windows环境使用composer安装YII2.0

2017-05-28 09:59 417 查看

1. 安装composer.exe;

2. 更新最新版本的composer

`composer self-update`


3. 修改镜像为中国可以用的镜像地址

`composer config -g repo.packagist composer https://packagist.phpcomposer.com`


4. 安装YII

`composer create-project yiisoft/yii2-app-advanced advanced 2.0.11`


安装过程中如果提示:

Could not fetch https://api.github.com/repos/jquery/jquery-dist/commits/9690801db01709bfbff5f977d07fb7cc14472908, please create a GitHub OAuth token to go over the API rate limit

Head to https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+Puzhongbo+2017-05-28+0141 
to retrieve a token. It will be stored in "C:/Users/Administrator/AppData/Roaming/Composer/auth.json" for future use by Composer.

Token (hidden):


解决方法: 进入github设置一个token就行了;
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  yii