Credits from: https://tutsforweb.com/installing-laravel-homestead-on-windows-step-by-step/
- Intel - https://downloadcenter.intel.com/download/7838
- AMD - http://download.amd.com/techdownloads/AMD-VwithRVI_Hyper-V_CompatibilityUtility.zip
Windows 10 Super+S, Type: Control Panel and goto Programs and Features
-
Website - https://www.virtualbox.org/wiki/Download_Old_Builds_5_2 VirtualBox 5.2.34 - https://download.virtualbox.org/virtualbox/5.2.34/VirtualBox-5.2.34-133893-Win.exe
-
Website - https://www.vagrantup.com/downloads.html Vagrant - https://releases.hashicorp.com/vagrant/2.2.6/vagrant_2.2.6_x86_64.msi
-
Website - https://git-scm.com/download/ Git Bash - https://github.com/git-for-windows/git/releases/download/v2.24.1.windows.2/Git-2.24.1.2-64-bit.exe
vagrant box add laravel/homestead
If you encounter an error refer to Installing Homestead Box - https://tutsforweb.com/installing-laravel-homestead-on-windows-step-by-step#4_Installing_Homestead_Box
Open Git Bash
$ cd ~
$ git clone https://github.com/laravel/homestead.git Homestead
$ cd Homestead
$ bash init.sh
If you have already: ~/.ssh/id_rsa.pub, this is optional
$ ssh-keygen -t rsa -C "my_email@example.com"
This is my Homestead.yaml
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
ssl: true
#php: "7.1"
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: e:/www
to: /home/vagrant/www
- map: e:/www/coreapp
to: /home/vagrant/www/coreapp
sites:
- map: coreapp.test
to: /home/vagrant/www/coreapp/public
php: "7.1"
schedule: true
databases:
- coreapp_livev2
features:
- mariadb: true
- ohmyzsh: false
- webdriver: false
# ports:
# - send: 50000
# to: 5000
# - send: 7777
# to: 777
# protocol: udp
*In windows this is located at: C:\Windows\System32\drivers\etc* ..and this is my host file
192.168.10.10 coreapp.test
I cloned homestead to my SDCard which is E:/ drive and this is my .bash_profile for Homestead alias
alias ..="cd .."
alias vm="ssh vagrant@127.0.0.1 -p 2222"
function homestead() {
( cd /e/Homestead && vagrant $* )
}
I added a Bash profile to profiles.json file, using GitBash
{
"closeOnExit" : true,
"colorScheme" : "Campbell",
"commandline" : "C:/Progra~1/Git/bin/bash.exe --cd-to-home --init-file ~/.bash_profile",
"cursorColor" : "#FFFFFF",
"cursorShape" : "bar",
"fontFace" : "Dejavu sans mono",
"fontSize" : 10,
"historySize" : 9001,
"icon" : "ms-appx:///ProfileIcons/{9acb9455-ca41-5af7-950f-6bca1bc9722f}.png",
"name" : "Bash",
"guid" : "{3e471859-5554-4f08-8219-6023820d85d1}",
"padding" : "10, 0, 10, 10",
"snapOnInput" : true,
"acrylicOpacity" : 0.75,
"useAcrylic" : false,
"tabTitle" : "Bash "
},
{
"closeOnExit" : true,
"colorScheme" : "Campbell",
"commandline" : "C:/Progra~1/Git/bin/bash.exe --cd-to-home --init-file ~/.bash_profile -c \"export TERM=xterm-256color && cd /e/Homestead && vagrant up && vagrant ssh && echo -e '\n' && (read -n 1 -p 'Press Y/y to stop vagrant, or any key to continue...' RESP && echo -e '\n' && [[ $RESP =~ ^(y|Y)$ ]] && vagrant halt || vagrant status) && bash\"",
"cursorColor" : "#FFFFFF",
"cursorShape" : "bar",
"fontFace" : "mononoki",
"fontSize" : 13,
"historySize" : 9001,
"icon" : "ms-appx:///ProfileIcons/{9acb9455-ca41-5af7-950f-6bca1bc9722f}.png",
"name" : "Homestead SSH",
"guid" : "{3e471859-5554-4f08-8219-6023820d85d2}",
"padding" : "10, 0, 10, 10",
"snapOnInput" : true,
"useAcrylic" : false,
"tabTitle" : "Bash "
}
Close git bash and running homestead should work.
Refer: https://medium.com/dinssa/ssl-certificates-laravel-homestead-windows-https-f83ec8b3198
$ homestead ssh
$ cd /etc/nginx/ssl
$ cp ca.homestead.homestead.crt /home/vagrant/www
- Open your web browser’s setting & select Advanced: Google Chrome: chrome://settings Mozzila Firefox: about:preferences#privacy
- Find Manage / View Certificates.
- Select Import and browse for the certificate you just copied from your virtual machine on to your local machine.
- Under the section labelled Place all certificates in the following store, find and select Trust Root Certification Authorities.
- Now you’re ready and just need to restart your web browser.
# Homestead.yaml (Edit Homestead.yaml above)
ssl: true
$ homestead up
$ homestead ssh
$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
$ sudo npm install -g n
$ source ~/.bashrc
$ nvm uninstall <current version>
$ nvm install v11.15.0
$ nvm use v11.15.0
$ node -v
MySQL Host: 10.0.2.15 or 127.0.0.1
Username: homestead
Password: secret
Database: (empty)
Port: (empty)
SSH HOST: 192.168.10.10
SSH User: vagrant
SSH Key: ~/.ssh/id_rsa
SSH PORT: (empty)