yii2 - 1: composer 安装yii2 - 申请github账户,获取token 安装yii2


1.在使用github获取数据的时候,需要注册一个github账户

在账户  Account  -->Setting 点击后页面刷新后, 点击 Personal access tokens,  点击Generate new Token按钮 生成token

2.在安装composer的路径下:

执行:

php composer.phar create-project yiisoft/yii2-app-advanced advanced 2.0.6

当然,看版本号,目前最新是2.0.6

在执行过程中,提示:

Could not fetch https://api.github.com/repos/RobinHerbots/jquery.inputmask/commits/b8f06eef3ccf9b8009607f30d47f66133670afc2, 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+nsyong+2015-09-06+1627
to retrieve a token. It will be stored in "/root/.composer/auth.json" for future use by Composer.
Token (hidden): 

在这里通过粘贴的方式吧上面的token粘贴上去,即可下载完成,整个Log

[root@nsyong yii_framework]# curl -sS https://getcomposer.org/installer | php
#!/usr/bin/env php
All settings correct for using Composer
Downloading...

Composer successfully installed to: /www/web/yii_framework/composer.phar
Use it: php composer.phar
[root@nsyong yii_framework]# php composer.phar create-project yiisoft/yii2-app-advanced advanced 2.0.6
Installing yiisoft/yii2-app-advanced (2.0.6)
  - Installing yiisoft/yii2-app-advanced (2.0.6)
    Downloading: 100%         

Created project in advanced
Loading composer repositories with package information
Installing dependencies (including require-dev)
Reading bower.json of bower-asset/jquery.inputmask (3.1.40)
Could not fetch https://api.github.com/repos/RobinHerbots/jquery.inputmask/commits/b8f06eef3ccf9b8009607f30d47f66133670afc2, 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+nsyong+2015-09-06+1627
to retrieve a token. It will be stored in "/root/.composer/auth.json" for future use by Composer.
Token (hidden): 
Token stored successfully.                                                                                                                                              - Installing yiisoft/yii2-composer (2.0.3)               
    Downloading: 100%         

  - Installing ezyang/htmlpurifier (v4.6.0)
    Downloading: 100%         

  - Installing cebe/markdown (1.1.0)
    Downloading: 100%         

  - Installing bower-asset/jquery (2.1.4)
    Downloading: 100%         

  - Installing bower-asset/jquery.inputmask (3.1.63)
    Downloading: 100%         

  - Installing bower-asset/punycode (v1.3.2)
    Loading from cache

  - Installing bower-asset/yii2-pjax (v2.0.4)
    Downloading: 100%         

  - Installing yiisoft/yii2 (2.0.6)
    Downloading: 100%         

  - Installing swiftmailer/swiftmailer (v5.4.1)
    Downloading: 100%         

  - Installing yiisoft/yii2-swiftmailer (2.0.4)
    Downloading: 100%         

  - Installing yiisoft/yii2-codeception (2.0.4)
    Downloading: 100%         

  - Installing bower-asset/bootstrap (v3.3.5)
    Downloading: 100%         

  - Installing yiisoft/yii2-bootstrap (2.0.4)
    Downloading: 100%         

  - Installing yiisoft/yii2-debug (2.0.5)
    Downloading: 100%         

  - Installing bower-asset/typeahead.js (v0.10.5)
    Loading from cache

  - Installing phpspec/php-diff (v1.0.2)
    Downloading: 100%         

  - Installing yiisoft/yii2-gii (2.0.4)
    Downloading: 100%         

  - Installing fzaninotto/faker (v1.5.0)
    Downloading: 100%         

  - Installing yiisoft/yii2-faker (2.0.3)
    Downloading: 100%         

fzaninotto/faker suggests installing ext-intl (*)
Writing lock file
Generating autoload files
[root@nsyong yii_framework]# ls
advanced  composer.phar

到这里yii2的安装全部完成。


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值