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

来源:互联网 发布:kdl55w800b安装软件 编辑:程序博客网 时间:2024/06/15 16:32


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 limitHead to https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+nsyong+2015-09-06+1627to 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 phpAll settings correct for using ComposerDownloading...Composer successfully installed to: /www/web/yii_framework/composer.pharUse it: php composer.phar[root@nsyong yii_framework]# php composer.phar create-project yiisoft/yii2-app-advanced advanced 2.0.6Installing yiisoft/yii2-app-advanced (2.0.6)  - Installing yiisoft/yii2-app-advanced (2.0.6)    Downloading: 100%         Created project in advancedLoading composer repositories with package informationInstalling 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 limitHead to https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+nsyong+2015-09-06+1627to 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 fileGenerating autoload files[root@nsyong yii_framework]# lsadvanced  composer.phar

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


0 0
原创粉丝点击