mac 安装laravel
安装laravel之前先安装composer
使用 curl 指令下载:
curl -sS https://getcomposer.org/installer | php
或是沒有安裝 curl ,也可以用 php 指令下载:
php -r "readfile('https://getcomposer.org/installer');" | php
当你下载了 composer.phar 后,可以将它放在目录中,但每次当你建立新目录时,你必須再复制一个副本到新目录中,这样比较麻烦。所以最佳做法是将它放到 usr/local/bin 目录中中,成为全域指令。 mv composer.phar /usr/local/bin/composer
之后会在当前文件夹产生composer.phar把他放进 /usr/local/bin/composer
在~/.bash_profile把/usr/local/bin添加到环境变量
vi ~/.bash_profile exportPATH=/usr/local/bin:$PATH使用composer 安装 laravel
输入composer global require "laravel/installer=~1.1"命令查看
composer global require "laravel/installer=~1.1"
Changed current directory to /Users/yangyanqing/.composer
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 10 installs, 0 updates, 0 removals
- Installing symfony/process (v4.1.1): Downloading (100%)
- Installing symfony/polyfill-ctype (v1.8.0): Downloading (100%)
- Installing symfony/filesystem (v4.1.1): Downloading (100%)
- Installing symfony/polyfill-mbstring (v1.8.0): Downloading (100%)
- Installing symfony/console (v4.1.1): 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.3.3): Downloading (100%)
- Installing laravel/installer (v1.5.0): Downloading (100%)
symfony/console suggests installing psr/log-implementation (For using the console logger)
symfony/console suggests installing symfony/event-dispatcher ()
symfony/console suggests installing symfony/lock ()
guzzlehttp/guzzle suggests installing psr/log (Required for using the Log middleware)
Writing lock file
Generating autoload files
输入laravel命令查看
laravel
Laravel Installer 1.5.0
Usage:
command [options] [arguments]
Options:
-h, --help Display this help message
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Available commands:
help Displays help for a command
list Lists commands
new Create a new Laravel application.
1、进入到设置的根目录
cd /Users/username/wwwroot
2、此时可以使用 laravel new 命令建立一份全新安装的 Laravel 应用,
例如: laravel new blog 将会在当前目录下建立一个名为 blog 的目录,
此目录里面存放着全新安装的 Laravel 相关代码,
此方法跟其他方法不一样的地方在于会提前安装好所有相关代码,
不需要再通过 composer install 安装相关依赖,速度会快许多。
laravel new blog
或者
通过 Composer Create-Project,你一样可以通过 Composer 在命令行执行 create-project 来安装 Laravel:
composer create-project laravel/laravel --prefer-dist
3、打开浏览器: http://localhost/blog/publi
如果报错,需要给权限
chmod -R -777 blog
参考:
https://blog.csdn.net/u013664733/article/details/54343768
mac 安装laravel的更多相关文章
- laravel(一):如何安装laravel
1.前提条件 本文针对想从零开始开发 Laravel 程序的初学者,不需要预先具备任何的 Laravel 使用经验.不过,为了能顺利阅读,还是需要事先安装好一些软件: PHP 5.4 及以上版本 包管 ...
- Mac安装LNMP环境,升级php7
Mac安装nginx+mysql+php 安装nginx比较麻烦,要安装pcre ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre ...
- 解决安装laravel/homestead vagrant环境报"A VirtualBox machine with the name 'homestead' already exists."的错误
之前在mac上安装laravel/homestead vagrant虚拟机环境时由于参照的教程是: 每次都必须在~/Homestead目录下边运行vagrant up/halt命令,觉得实在是不方便, ...
- 使用国内镜像composer安装laravel
1.安装 Laravel,创建blog项目 首先先说一下直接安装的方法,要想使用这个方法,首先要FQ(这是我们的基本国情决定的).这样的安装方式有两种: ①.全局安装 使用命令Laravel Inst ...
- composer镜像安装laravel
博主最近在学习Laravel的框架的相关知识,对于Laravel的许多新特性,大家最好还是去查看官网文档最好,Laravel的文档非常完善,中文英文的都有,可以很好的解决你的困惑. 但是我们会发现学习 ...
- windows安装Laravel框架经验心得(一)
作为一个程序员,要活到老学到老.虽然自己水平很菜,但是也要继续往前走,所以打算利用一些空闲时间在学习一些新知识,比如Laravel框架. 看书费劲,好不容易找到了一些关于Laravel的教学视频.不过 ...
- mac安装tensorflow报错
问题:mac安装tensorflow过程中,爆出oserror:permission denied 解决方案:关闭mac的sip,然后sudo安装 关闭sip的方法:重启mac,按住command+R ...
- Mac 安装activate-power-mode atom
Mac 安装activate-power-mode atom 标签: atommac 2015-12-02 14:53 308人阅读 评论(0) 收藏 举报 分类: git(2) 版权声明:本文为 ...
- Mac安装ctags
Mac安装ctags mac 系统有自带的ctags,但是不支持"ctags -R"指令,需要自己在安装Exuberant Ctags 1.下载ctags 2. 安装 ./conf ...
随机推荐
- 较新版FlowPortal BPM不能回车登录
在BPM安装目录中找到路径:WEB\YZSoft\Login\2018\js\login.js 加回车登录代码如下 //回车登录 $('.yz-input.yzglyph.uid').bind('ke ...
- CHD-5.3.6集群上hive安装
解压过后: [hadoop@master CDH5.3.6]$ ls -rlttotal 8drwxr-xr-x. 17 hadoop hadoop 4096 Jun 2 16:07 hadoop- ...
- onload;readystatechange;DOMContentLoaded事件
当文档的 readyState 属性发生改变时,会触发 readystatechange 事件. onload 事件会在页面或图像加载完成后立即发生 当纯HTML被完全加载以及解析时,DOMConte ...
- 01 数据库sql
1, 关于mysql,常去的地方有:https://www.yiibai.com/mysql, http://tool.oschina.net/apidocs/apidoc?api=mysql-5.1 ...
- es中的相关知识一(基本知识和id的定义)
一.es中文档的元数据包括: 1._index: 索引(index)类似于关系型数据库里的数据库(database),事实上,我们的数据被存储和索引在分片(shards)中,索引知识把一个或多个分片分 ...
- 【CF598 Div3 F】Equalizing Two Strings
一道通篇结论的傻逼题,被 lh 随手秒了 别告诉我你不会 Div3 的题,你肯定在 fake 没看过题解,以下做法纯属口胡,应该没问题 Description https://www.luogu.or ...
- 如何发布一个npm包?
npm包在现在前端开发中经常使用且便利,而我也是经常使用,而没研究怎么去发布npm.那如何发布npm包呢? 一.在npm的官网上注册一个账号登录,https://www.npmjs.com/ 注意此步 ...
- iOS的VideoToolBox与Android的MediaCodec对PTS的处理异同
视频源,不论是从采集设备采集到的,还是本身压制好的文件,其流中的数据都是按照编码顺序存储的.比如1 2 3 4 5,5帧视频数据,1编码成I帧,2 3 4编码成B帧,5编码成P帧. 编码过程: 1. ...
- C# LINQ(10)
LINQ 查询 var query = from r in Formula1.GetChampions() where r.Country == "Brazil" orderby ...
- ACM-ICPC 2017 沈阳赛区现场赛 G. Infinite Fraction Path && HDU 6223(BFS)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6223 参考题解:https://blog.csdn.net/qq_40482495/article/d ...