美文网首页
mac 安装homestead步骤

mac 安装homestead步骤

作者: 塞外务农 | 来源:发表于2018-06-17 19:44 被阅读0次

    1. 安装virtualbox  

                        https://www.virtualbox.org/wiki/Downloads

    2. 安装vagrant     

                        https://link.jianshu.com/?t=https://www.vagrantup.com/downloads.html

    3. 安装Homestead Vagrant Box

                        https://app.vagrantup.com/laravel/boxes/homestead

                        https://app.vagrantup.com/laravel/boxes/homestead/versions/5.1.0/providers/virtualbox.box

                        https://vagrantcloud.com/laravel/boxes/homestead/versions/5.1.0/providers/virtualbox.box

    4. 安装Homestead

            切换到用户文件夹

            cd~

            克隆homestead项目 到 home/Homestead 文件夹

            git clone https://github.com/laravel/homestead.git Homestead

            cd~/Homestead

            bash init.sh

    5. 编辑 Homestead.yaml

    6. 启动虚拟机

                 cd ~/Homestead

                 vagrant up

                 vagrant ssh

    7. 虚拟机中安装laravel, 或者在宿主机中安装也可以,会自动同步过去

                 composer create-project laravel/laravel Laravel --prefer-dist

    8. 连接数据库是 33060    homtstead secret

    9. redis客户端连接需要用4040端口,且注释bind 127.0.0.1 这一行

    10. 修改端口

            登录虚拟机,vi    /vagrant/scripts/homestead.rb       [default_ports项]

            测试端口  curl -v 127.0.0.1:7039

            查找字符串   grep -rn "4040" *

    相关文章

      网友评论

          本文标题:mac 安装homestead步骤

          本文链接:https://www.haomeiwen.com/subject/auoweftx.html