mac laravel 安装

张映 发表于 2017-04-01

分类目录: php

标签:, , ,

Laravel是一套简洁、优雅的PHP Web开发框架(PHP Web Framework)。它可以让你从面条一样杂乱的代码中解脱出来;它可以帮你构建一个完美的网络APP,而且每行代码都可以简洁、富于表达力。

1,安装composer

$ brew install composer

2,换composer源

$ composer config -g repo.packagist composer https://packagist.phpcomposer.com

不换源的话,加代理,或者VPN,不然下不了东西。

3,安装laravel安装包

zhangyingdeMacBook-Pro:~ zhangying$ composer global require "laravel/installer"
Changed current directory to /Users/zhangying/.composer
Using version ^1.3 for laravel/installer
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 10 installs, 0 updates, 0 removals
  - Installing symfony/process (v3.2.6): Downloading (100%)
  - Installing psr/log (1.0.2): Downloading (100%)
  - Installing symfony/debug (v3.2.6): Downloading (100%)
  - Installing symfony/polyfill-mbstring (v1.3.0): Downloading (100%)
  - Installing symfony/console (v3.2.6): Downloading (100%)
  - Installing guzzlehttp/promises (v1.3.1): Downloading (100%)
  - Installing psr/http-message (1.0.1): Downloading (100%)
  - Installing guzzlehttp/psr7 (1.4.2): Downloading (100%)
  - Installing guzzlehttp/guzzle (6.2.3): Downloading (100%)
  - Installing laravel/installer (v1.3.5): Downloading (100%)
symfony/console suggests installing symfony/event-dispatcher ()
symfony/console suggests installing symfony/filesystem ()
Writing lock file
Generating autoload files

4,设置软链接

$ ln -s ~/.composer/vendor/laravel/installer/laravel /usr/local/bin/

5,创建项目

zhangyingdeMacBook-Pro:www zhangying$ laravel new test
Crafting application...
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Package operations: 59 installs, 0 updates, 0 removals
  - Installing doctrine/inflector (v1.1.0): Downloading (100%)
  - Installing erusev/parsedown (1.6.2): Downloading (100%)
  - Installing jakub-onderka/php-console-color (0.1): Downloading (100%)
  - Installing symfony/polyfill-mbstring (v1.3.0): Downloading (100%)
  - Installing symfony/var-dumper (v3.2.6): Downloading (100%)

官网上面的安装文档,有点乱,在这里整理一下



转载请注明
作者:海底苍鹰
地址:http://blog.51yip.com/php/1852.html

留下评论

留下评论
  • (必需)
  • (必需) (will not be published)
  • (必需)   2X8=?