这堂课,须要先在机安装好 putty,winscp,navicat for mysql,node 这四个软件php
配置putty,Hostname中填 127.0.0.1 port中填2222html
使用用户名vagrant,密码vagrant登陆前端
vagrant@homestead:~/abcde/study$ composer config -g repo.packagist composer https://packagist.phpcomposer.com vagrant@homestead:~/abcde/study$ composer create-project --prefer-dist laravel/laravel myblog
vagrant@homestead:~/abcde/study$ cd myblog vagrant@homestead:~/abcde/study/myblog$ sudo npm install -g cnpm --registry=https://registry.npm.taobao.org vagrant@homestead:~/abcde/study/myblog$ sudo cnpm i
说明1: 其实是安装到了D:\03www2018\study\myblog中,abcde对应本机的D:\03www2018,这是在homestead.yaml中配置的
说明2: 若是win10不是管理员的身份登陆,必定在dos下切换为管理员身份安装,不然安装不成功
说明3: 若是安装慢,改成淘宝仓库,我上面就是使用的是淘宝仓库
说明4: 以管理员身份启动vagrant up后,在虚拟机中安装通常没问题,若是实在不行的能够改在本机win10下安装mysql
D:\www2018\study\myblog>npm i
参考: https://laravel.com/docs/5.5/... To Databaseslaravel
文件/新建链接`ip是127.0.0.1,端口是 33060,用户名是 homestead,密码是 secret,链接名我取 homestead4.0.0
sql
GRANT ALL PRIVILEGES ON blog.* TO 'wang'@'%' IDENTIFIED BY 'fa168' WITH GRANT OPTION;
字符集 utf8mb4 -- UTF-8 Unicode,排序规则 utf8mb4_general_ci数据库
注意:上面登陆的帐号是vagrant,不是root,咱们须要一个root帐户,怎么作?npm
vagrant@homestead:~$ sudo passwd root Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully vagrant@homestead:~$ vagrant@homestead:~$ su root Password: root@homestead:/home/vagrant/abcde/study#