windows下安裝laravel簡單步驟以及碰到的問題

洋蔥土豆隨心匠發表於2016-02-24

  

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

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

相關文章