码迷,mamicode.com
首页 > 其他好文 > 详细

laravel homestead

时间:2015-11-27 12:37:17      阅读:121      评论:0      收藏:0      [点我收藏+]

标签:

laravel homestead真是个好东西啊,折腾了很长时间,终于ok啦。

安装成功之后,在~目录下有个homstead,进入执行vagrant up

clzdeMBP:Homestead clz$ vagrant up 
Bringing machine ‘default‘ up with ‘virtualbox‘ provider...
==> default: Checking if box ‘laravel/homestead‘ is up to date...
==> default: A newer version of the box ‘laravel/homestead‘ is available! You currently
==> default: have version ‘0.3.0‘. The latest is version ‘0.3.3‘. Run
==> default: `vagrant box update` to update.
==> default: Resuming suspended VM...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key
==> default: Machine booted and ready!

配置文件

clzdeMBP:Homestead clz$ cd ~
clzdeMBP:~ clz$ cd .homestead/
clzdeMBP:.homestead clz$ vim Homestead.yaml

  

folders:
    - map: ~/project/vagrant/php7dev
      to: /home/vagrant/Code

sites:
    - map: php7dev.app
      to: /home/vagrant/Code/php7dev

第一个folders  就是本地文件夹和虚拟机文件夹的一个映射关系  在本地的文件的改动会同步到虚拟机文件件里

登录到虚拟机  在homstead目录下执行vagrant ssh  可以进入到虚拟机里  在虚拟机里可以对服务 nginx  mysql  phpfpm  等的操作

在本地的hosts里配置访问的域名。

laravel homestead

标签:

原文地址:http://www.cnblogs.com/webclz/p/4999944.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!