windows下安装laravel简单步骤以及碰到的问题
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了windows下安装laravel简单步骤以及碰到的问题相关的知识,希望对你有一定的参考价值。
1.下载并安装composer
http://pkg.phpcomposer.com/
=========================================================================
命令行中如果无法运行php等命令,请确保对应目录已添加到环境变量中。
=============================================================
2.新建站点目录,在站点目录中使用如下命令下载lavarel
composer create-project --prefer-dist laravel/laravel learnlaravel5
=========================================================================
如果出现The openssl extension is required for SSL/TLS protection but is not available. If you can not enable the openssl extension, you can disable this error, at your own risk, by setting the ‘disable-tls‘ option to true.
这个错误。使用以下命令关闭错误:composer config -g -- disable-tls true
=========================================================================
安装laravel过程中需要用到git
git下载地址:http://git-scm.com/download/win
git安装时选择git bash和windows command 同时支持运行。
=========================================================================
-----出现Could not find package lavarel/laravel with stability stable .错误,其实是输错了名称导致。另外不排除php版本的问题,中间装了一下php5.6。lavarel5.2要求php5.5以上。
=========================================================================
windows8下运行php Composer出现ssl报错的问题:
[Composer\Downloader\TransportException]
The "https://packagist.org/packages.json" file could not be downloaded: SSL
operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify
failed
Failed to enable crypto
failed to open stream: operation failed
----类似以上错误
这是没有安装CA证书导致的!!!
CA证书下载地址:http://curl.haxx.se/docs/caextract.html
然后修改php.ini文件
openssl.cafile= D:/wamp/php/verify/cacert.pem
=========================================================================
以上是关于windows下安装laravel简单步骤以及碰到的问题的主要内容,如果未能解决你的问题,请参考以下文章
windows环境下composer安装laravel,laravel-admin,新手教程
windows环境下composer安装laravel,laravel-admin,新手教程
windows环境下composer安装laravel,laravel-admin,新手教程
[Laravel系列](-).windows 下安装composer
Windows 7/8/10 系统下Laravel框架的开发环境安装及部署详解(Vagrant + Homestead)