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):
[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