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报错的问题:
[ComposerDownloaderTransportException]
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

=========================================================================

原文地址:https://www.cnblogs.com/yangcclg/p/5212616.html