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并下载安装(要求能vpnFQ)
4:安装如果出现错误
Notice: Undefined variable:caBundlein - 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>
转载于:https://www.cnblogs.com/caicaizi/p/5625435.html
win10使用Composer-Setup安装Composer以及使用Composer安装Yii2最新版相关推荐
- docker 容器安装conposer_Docker下用composer国内镜像安装Laravel
自己在docker拉取了composer镜像,如何在docker上启动composer容器,使用composer国内镜像安装包呢? composer国内镜像和composer安装包的命令就不多说了,我 ...
- debian执行php网页,如何在Debian上安装和使用PHP Composer
php composer是一个包管理工具,它消除了手动维护应用程序的PHP包的麻烦,可以使用composer轻松安装所有必需的包.本篇文章将介绍在Debian系统上安装和配置PHP Composer的 ...
- ubuntu 缺少php安装包,ubuntu 16.04 lts安装php环境和composer依赖包管理
安装环境 1.安装之前先更新系统 1 sudo apt update 2.安装Apache2 1 sudo apt install apache2 3.安装PHP 1 sudo apt install ...
- 零基础学习MSP430F552LP开发板,学习前期准备,Code Composer Studio(CCS)软件的安装
零基础学习MSP430F552LP开发板 一.前言 零基础学习MSP430F552LP开发板,为电子设计竞赛做准备以及学好这一款芯片. 在选择比赛题目时,发现有的题目时规定使用ti的芯片作为控制MCU ...
- Win10下VB6.0开发之VB6.0的安装
日前在做一个工控软件的开发项目,由于软件最终的运行环境是在Windows XP的下,考虑到兼容性问题,选择了visual basis 6.0.第一次上手VB6.0的开发,遇到了很多问题,在这里开个系列 ...
- win10安装sql server2000卡住在“安装程序正在安装 Microsoft 数据访问组件 (MDAC)...
win10安装sql server2000卡住在"安装程序正在安装 Microsoft 数据访问组件 (MDAC)...",这个问题之前遇到过几次,每次处理的结果都是大同小异,现在 ...
- 【安装OS】联想Yago11s 安装win10
制作U盘启动盘 使用ULtraISO制作启动盘 参照:http://jingyan.baidu.com/article/a378c960630e61b329283045.html 修改联想Yago11 ...
- oracle 的setup没反应,win10系统下setup.exe打不开没反应如何解决
最近有win10纯净版系统用户反映说碰到这样一个问题,就是在双击setup.exe的时候没有任何反映,打不开,遇到这样的问题该怎么办呢,接下来给大家讲解一下win10系统下setup.exe打不开没反 ...
- 计算机上某个程序破坏,win10某个对象程序库丢失或损坏请运行安装程序怎么解决...
有win10用户在使用excel表格的时候出现某个对象程序库丢失或损坏请运行安装程序的提示,该提示是stdole32.tld文件丢失或损坏导致的,那么在win10系统里出现该文件问题的话要怎么解决呢, ...
最新文章
- Reverse Engineering Custom DataTypes - GUID() in SQL Server to PostgreSQL
- Mac OS使用技巧十九:Safari碉堡功能之二查看网页源代码
- 028_jQuery数据
- 2011年的总结:Fans同学的成败得失
- java反射invoke空指针_【Java】Java 反射 object is not an instance of declaring cla
- php7的稳定性,探索PHP7(一)--性能
- Ubuntu下载gitea
- 如何解决两个相邻的span中间有空隙
- 毕业论文计算机附录模板,毕业论文格式是什么,附录又是什么?
- hive 配置用户名_Hive的安装及配置
- 机器学习之路:python 集成分类器 随机森林分类RandomForestClassifier 梯度提升决策树分类GradientBoostingClassifier 预测泰坦尼克号幸存者...
- 程序员身体容易出什么毛病..
- 2007年测试员的工具选择排名
- postgresql 修改字段长度
- Python天气查询系统(连接数据库版)
- 软件测试简历没有项目经验怎么写?
- QR分解-givens旋转与Householder变换
- 数控数据采集跨平台免授权扎克(mazak)西门子(Siemens)海德汉(heidenhain)广数(GSK)、凯恩帝(knd)、三菱、海德汉、兄弟、哈斯、宝元、新代、发那科(Fanuc)、华中
- python matplotlib cannot import name ‘artist‘ from ‘matplotlib‘
- 微信 css area,微信小程序--手写一个地区选择器(多级联动)
热门文章
- *【PAT天梯】分而治之(并查集,暴力)
- 【UVA - 11729】Commando War (贪心,时间调度问题)
- 【CodeForces - 124D】Squares (旋转坐标系,计算几何,思维)
- 算法--背包九讲(详细讲解+代码)
- 10点43博客文章汇总(2018年度)
- chrome插件中调用ajax,Chrome扩展程序中的Ajax调用无效
- python创建变量并赋值_python怎么给变量赋值
- 树莓派要mysql的密码_树莓派raspberry Pi 3B+系统中安装mysql过程中不提示输入密码,安装完后如何设置密码...
- JDK 7,jdk1.7 安装及配置
- 字符串匹配之KMP(KnuthMorrisPratt)算法(图解)