2,435   Composer PHP

官网和国内中文网站也介绍了很多安装方式,

官网:http://laravel.com/

中文网站:http://www.golaravel.com/,http://laravel-china.org/

 

中文网站提供了一键安装包,即已经为laravel编译了依赖包等,不希望折腾的可直接去下载,不用往下看了,地址:http://www.golaravel.com/download/

 

1,到github下载laraveld安装包zip,访问:https://github.com/laravel/laravel,下载个版本4.2.11,了解下低版本

2,解压laravel ,进入目录修改composer.json,依赖包的源,更改为国内的源,添加以下内容

“repositories”: [ {“type”: “composer”, “url”: “http://packagist.phpcomposer.com”}, {“packagist”: false} ]

 

3,在cmd窗口进入到laravel的解压根目录下,运行composer install 下载laravel的依赖包,显示如下

D:\wamp\www\laravel-4.2.11>composer install
Loading composer repositories with package information
Installing dependencies (including require-dev)
– Installing symfony/translation (v2.5.12)
Downloading: 100%

– Installing symfony/security-core (v2.5.12)
Downloading: 100%

··············································

– Installing laravel/framework (v4.2.17)
Downloading: 100%

symfony/translation suggests installing symfony/config ()
symfony/translation suggests installing symfony/yaml ()

···········
ssion matching)
symfony/routing suggests installing doctrine/annotations (For using the annotati
on loader)
symfony/event-dispatcher suggests installing symfony/dependency-injection ()

essages to Google Chrome)
d11wtq/boris suggests installing ext-readline (*)
d11wtq/boris suggests installing ext-pcntl (*)
d11wtq/boris suggests installing ext-posix (*)
laravel/framework suggests installing doctrine/dbal (Allow renaming columns and
dropping SQLite columns.)
Writing lock file
Generating autoload files
> php artisan clear-compiled
> php artisan optimize
Generating optimized class loader
Compiling common classes
Compiling views

D:\wamp\www\laravel-4.2.11>

 

4,最后将laravel目录拷贝到wamp的访问根目录www下面,即可在浏览器打开,显示界面

 

QQ图片20150830160702

error
1, problem : Could not find package laravel/laravel with stability stable
solution : composer create-project laravel/laravel appname –prefer-dist 5.1

2, problem : No supported encrypter found. The cipher and / or key length are invalid
solution :
(1) make sure that there is .env in laravel root floder , and the parameter APP_KEY is included;
(2) run the commond : php artisan key:generate




Leave a Reply

Your email address will not be published. Required fields are marked *