win10使用Composer-Setup安装Composer以及使用Composer安装Yii2最新版
1:下载 ca-bundle.crt和cacert.pem
将这两个文件放在php目录下

2:php.ini中添加上述两个文件的路径
curl.cainfo=C:/xampp/php/ca-bundle.crt
openssl.cafile=C:/xampp/php/ca-bundle.crt
写到最后一行就可以
3:下载Composer-Setup.exe
https://getcomposer.org/download/
在该页面找到Composer-Setup.exe并下载安装(要求能vpn翻墙)
4:安装如果出现错误
Notice: Undefined variable: caBundle in - on line 892
出现该错误的时候,找到错误路径打开install文件,找到892行

红线的地方报caBundle未定义,手动改成如下:

改完之后保存文件,并且退出Composer-Setup.exe(不要继续安装),然后重新安装,不报错,走完安装过程
5:验证安装结果:

6:安装Yii2
在服务器上建立访问目录yii2,
在github的个人信息的设置上生成一个token,后面创建项目的时候提示token(hidden)的时候将这个token复制上去
参照
http://www.yiiframework.com/download/
安装Yii2的最新版本,
注意要将下面这两行创建命令
php composer.phar global require "fxp/composer-asset-plugin:~1.1.1"
php composer.phar create-project yiisoft/yii2-app-basic basic 2.0.6
改为:
composer global require "fxp/composer-asset-plugin:~1.1.1"
composer create-project yiisoft/yii2-app-basic basic 2.0.6
如果是advanced项目:
composer create-project yiisoft/yii2-app-advanced advanced 2.0.6 然后等待安装,cmd显示如下:
Microsoft Windows [版本 10.0.10240] (c) 2015 Microsoft Corporation. All rights reserved.
C:\Users\jzzq>cd C:\xampp\htdocs\yii2
C:\xampp\htdocs\yii2>php composer.phar global require "fxp/composer-asset-plugin:~1.1.1" Could not open input file: composer.phar
C:\xampp\htdocs\yii2>composer self-update You are already using composer version 03299ff075236be27be356498d6c64def973fe41.
C:\xampp\htdocs\yii2>php composer.phar global require "fxp/composer-asset-plugin:~1.1.1" Could not open input file: composer.phar
C:\xampp\htdocs\yii2>composer global require "fxp/composer-asset-plugin:~1.1.1" Changed current directory to C:/Users/jzzq/AppData/Roaming/Composer Deprecation Notice: The Composer\Package\LinkConstraint\MultiConstraint class is deprecated, use Composer\Semver\Constraint\MultiConstraint instead. in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Package/LinkConstraint/MultiConstraint.php:17 Deprecation Notice: The Composer\Package\LinkConstraint\LinkConstraintInterface interface is deprecated, use Composer\Semver\Constraint\ConstraintInterface instead. in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Package/LinkConstraint/LinkConstraintInterface.php:17 ./composer.json has been updated Loading composer repositories with package information Updating dependencies (including require-dev) - Removing fxp/composer-asset-plugin (v1.0.3) - Installing fxp/composer-asset-plugin (v1.1.1) Downloading: 100%
Writing lock file Generating autoload files
C:\xampp\htdocs\yii2>php composer.phar create-project yiisoft/yii2-app-basic basic 2.0.6 Could not open input file: composer.phar
C:\xampp\htdocs\yii2>composer create-project yiisoft/yii2-app-basic basic 2.0.6 Installing yiisoft/yii2-app-basic (2.0.6) - Installing yiisoft/yii2-app-basic (2.0.6) Loading from cache
Created project in basic Loading composer repositories with package information Installing dependencies (including require-dev) - Installing yiisoft/yii2-composer (2.0.3) Loading from cache
- Installing ezyang/htmlpurifier (v4.6.0) Loading from cache
- Installing bower-asset/jquery (2.1.4) Loading from cache
- Installing bower-asset/yii2-pjax (v2.0.5) Loading from cache
- Installing bower-asset/punycode (v1.3.2) Loading from cache
- Installing bower-asset/jquery.inputmask (3.1.63) Loading from cache
- Installing cebe/markdown (1.1.0) Loading from cache
- Installing yiisoft/yii2 (2.0.6) Loading from cache
- Installing swiftmailer/swiftmailer (v5.4.1) Loading from cache
- Installing yiisoft/yii2-swiftmailer (2.0.4) Loading from cache
- Installing yiisoft/yii2-codeception (2.0.4) Loading from cache
- Installing bower-asset/bootstrap (v3.3.5) Loading from cache
- Installing yiisoft/yii2-bootstrap (2.0.5) Loading from cache
- Installing yiisoft/yii2-debug (2.0.5) Loading from cache
- Installing bower-asset/typeahead.js (v0.10.5) Loading from cache
- Installing phpspec/php-diff (v1.0.2) Loading from cache
- Installing yiisoft/yii2-gii (2.0.4) Loading from cache
- Installing fzaninotto/faker (v1.5.0) Loading from cache
- Installing yiisoft/yii2-faker (2.0.3) Loading from cache
fzaninotto/faker suggests installing ext-intl (*) Writing lock file Generating autoload files > yii\composer\Installer::postCreateProject chmod('runtime', 0777)...done. chmod('web/assets', 0777)...done. chmod('yii', 0755)...done.
C:\xampp\htdocs\yii2>composer 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) - Installing yiisoft/yii2-composer (2.0.3) Loading from cache
- Installing ezyang/htmlpurifier (v4.6.0) Loading from cache
- Installing cebe/markdown (1.1.0) Loading from cache
- Installing bower-asset/jquery (2.1.4) Loading from cache
- Installing bower-asset/jquery.inputmask (3.1.63) Loading from cache
- Installing bower-asset/punycode (v1.3.2) Loading from cache
- Installing bower-asset/yii2-pjax (v2.0.5) Loading from cache
- Installing yiisoft/yii2 (2.0.6) Loading from cache
- Installing swiftmailer/swiftmailer (v5.4.1) Loading from cache
- Installing yiisoft/yii2-swiftmailer (2.0.4) Loading from cache
- Installing yiisoft/yii2-codeception (2.0.4) Loading from cache
- Installing bower-asset/bootstrap (v3.3.5) Loading from cache
- Installing yiisoft/yii2-bootstrap (2.0.5) Loading from cache
- Installing yiisoft/yii2-debug (2.0.5) Loading from cache
- Installing bower-asset/typeahead.js (v0.10.5) Loading from cache
- Installing phpspec/php-diff (v1.0.2) Loading from cache
- Installing yiisoft/yii2-gii (2.0.4) Loading from cache
- Installing fzaninotto/faker (v1.5.0) Loading from cache
- Installing yiisoft/yii2-faker (2.0.3) Loading from cache
fzaninotto/faker suggests installing ext-intl (*) Writing lock file Generating autoload files
C:\xampp\htdocs\yii2>
7:测试

win10使用Composer-Setup安装Composer以及使用Composer安装Yii2最新版的更多相关文章
- composer的安装以及laravel框架的安装(一)
laravel号称世界上最好的php框架,没有之一,下面介绍它的安装 laravel学习交流qq群:293798134 composer的安装 : php开发者很多,并且在web开发领域占据绝对统治地 ...
- windows下composer安装不了或composer命令无效的解决办法
安装方法: http://docs.phpcomposer.com/00-intro.html#Installation-Windows (官方中文帮助文档) 问题描述1: 通过Composer-Se ...
- 把git上的larave项目通过SourceTree安装上再通过composer安装依赖库
1.项目地址克隆 https://gitee.com/fps2tao/laravel5.5-alitaobao.git 通过SourceTree工具下载到本地 2.在命令行方式打开项目地址安装依赖库( ...
- 用composer安装php代码(以安装phpmailer为例)
1.安装composer.exe软件 2.下载composer.phar 3.创建composer.json文件 { "require": { "php": & ...
- 如何在Debian上安装和使用PHP Composer
1.条件 shell使用sudo权限访问正在运行的debian系统. 必须安装和配置5.3或更高版本的PHP. 2.在Debian上安装Composer 可以通过运行以下命令从getcomposer. ...
- win10操作系统下oracle11g客户端/服务端的下载安装配置卸载总结
win10操作系统下oracle11g客户端/服务端的下载安装配置卸载总结 一:前提 注意:现在有两种安装的方式 1. oracle11g服务端(64位)+oracle客户端(32位)+plsql(3 ...
- php私有组件以及创建自己的composer私有组件(packagist+git+composer)
1.私有组件 大多数时候我们使用的都是公开可用的开源组件,但有时候如果公司使用内部开发的PHP组件,而基于许可证和安全方面的问题不能将其开源,就需要使用私有组件.对Composer而言,这是小菜一碟. ...
- Inno Setup入门(十一)——完成安装后执行某些程序
Inno Setup入门(十一)——完成安装后执行某些程序 2011-02-16 16:24:23| 分类: Inno Setup | 标签:inno setup |举报 |字号 订阅 ...
- 使用Inno Setup 打包.NET程序,并自动安装.Net Framework
使用Inno Setup 打包.NET程序,并自动安装.Net Framework http://www.cnblogs.com/xiaogangqq123/archive/2012/03/19/24 ...
随机推荐
- LeetCode Implement pow(x, n).
这个题目我也没有思路,同学们可以查看这个http://www.cnblogs.com/NickyYe/p/4442867.html 下面是我改进后的代码 第一种方法: class Solution { ...
- jQuery MiniUI开发系列之:HTML标签配置
全部使用Javascript写一个界面,是一件很困难的事. 1)要求有较高的Javascript编程能力. 2)会造成“代码树”问题.一级又一级子"children",需要&quo ...
- LCD1602写自定义字符的Verilog源码
开发工具:Quartus II 9.1: 仿真软件:Questa Sim 10.0c: 硬件平台:Terasic DE2-115(EP2C35F672C6): 外设:hd44780控制器lcd1602 ...
- 关于view.measure
在编写下啦刷新的项目代码的时候,在Listview的HeaderView中的head.xml文件中,根布局为RelativeLayout的时候,在计算headerView.measure的时候,出现空 ...
- web_reg_find()函数的使用
1.此函数的作用,很显然就是能告之测试人员页面是否显示正确,其意义与价值在我此次支撑平台的性能测试得到了体现. 2.在使用此函数的过程中,遇到了非常郁闷的事情,幸得老大的帮助才得以跳出误区.当在此函数 ...
- 【摘要】多线程 - BeginInvoke异步调用
private delegate int MyMethod(); private int method() { Thread.Sleep(); ; } private void MethodCompl ...
- OLAT & OLTP
联机事务处理(OLTP)和联机分析处理(OLAP)的不同,主要通过以下五点区分开来. 用户和系统的面向性: OLTP是面向顾客的,用于事务和查询处理 OLAP是面向市场的,用于数据分析 数据内容: O ...
- Mybatis保存数据时事务问题
今天不小心在sqlplus中用for update ,然后事务没提交,结果在项目中一直保存不进去数据,找了很久发现是sqlplus中的事务没提交,哎,这种问题真得避免啊,一定要细心啊!
- 在SWING里嵌入SWT的组件
http://zhanghan3366.blog.163.com/blog/static/6966305220110505351568/ ——————————————————————————————— ...
- 第一零五天上课 PHP TP框架下分页
控制器代码(TestController.class.php) <?php namespace Home\Controller; use Home\Controller\EmptyControl ...