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 ...
随机推荐
- SVG学习之stroke-dasharray 和 stroke-dashoffset 详解
本文适合对SVG已经有所了解,但是对stoke-dasharray和stroke-dashoffset用法有疑问的童鞋 第一:概念解释 1. stroke意思是:画短线于,在...上划线 2. str ...
- kalilinux 渗透测试笔记
声明:本文理论大部分是苑房弘kalilinux渗透测试的内容 第五章:基本工具 克隆网页,把gitbook的书记下载到本地 httrack "http://www.mybatis.org/m ...
- Spring Data JPA引入和介绍
第1章 1.ORM概述[了解] ORM(Object-Relational Mapping) 表示对象关系映射.在面向对象的软件开发中,通过ORM,就可以把对象映射到关系型数据库中.只要有一套程序能 ...
- 本地套接字-本地socket
本地套接字简单应用场景 一 #服务端--简单 import socket import os a='sock_file' if os.path.exists(a): os.remove(a) s=so ...
- error connection reset by peer 104
connection reset by peer的常见原因 1.服务器的并发连接数超过了其承载量,服务器会将其中一些连接关闭:2. errno = 104错误表明你在对一个对端socket已经关闭的的 ...
- 揭秘如何用Python黑掉智能锅炉
引文 去年我买了一个新的冷凝式锅炉(家用取暖产品),于是考虑上面必须有一个“智能恒温器”,而选择也很多,包括Google Nest. Hive(英国天然气公司设计的) 以及伍斯特·博世‘Wave’ ...
- Django:中间件与csrf
一.中间件 什么是中间件 中间件有什么用 自定义中间件 中间件应用场景 二.csrf csrf token跨站请求伪造 一.中间件 什么是中间件 中间件顾名思义,是介于request与response ...
- Caffe---Pycaffe进行网络结构(xxx.prototxt)可视化
Pycaffe---进行网络结构(xxx.prototxt)可视化 解决网络结构(xxx.prototxt)可视化,还可以借助python接口,编写一个类似如下的pycaffe_draw_net.py ...
- wordpress网站不正常显示解决办法
第一种:自己在后台修改了wordpress网址,导致不能登陆后台. 解决办法: 1.首先我们登录MySql数据库,这个不用我教吧: 2.查看表”wp_options”的数据(你的表不一定是以”wp”开 ...
- 数据统计,包括mysql和MongoDB
select ct.dt, COUNT(DISTINCT c.id) from tms_service_customer c, tms_dispatch_details d, (select DIST ...