建置vagrant
https://linuxize.com/post/how-to-instal ... ntu-20-04/
laravel homestead官方文件
https://laravel.tw/docs/5.3/homestead
建置laravel homestead環境
https://blog.wu-boy.com/2014/09/get-hom ... m-running/
更新系統
代碼: 選擇全部
sudo apt-get upgrade代碼: 選擇全部
sudo apt install virtualbox代碼: 選擇全部
curl -O https://releases.hashicorp.com/vagrant/2.2.14/vagrant_2.2.14_x86_64.deb
sudo apt install ./vagrant_2.2.14_x86_64.deb代碼: 選擇全部
vagrant --version代碼: 選擇全部
vagrant box add laravel/homestead代碼: 選擇全部
This box can work with multiple providers! The providers that it
can work with are listed below. Please review the list and choose
the provider you will be working with.
1) parallels
2) virtualbox
Enter your choice:安裝 Homestead
代碼: 選擇全部
cd ~
git clone https://github.com/laravel/homestead.git Homestead代碼: 選擇全部
cd Homestead
bash init.sh代碼: 選擇全部
vim Homestead.yaml代碼: 選擇全部
---
ip: "192.168.10.10"
memory: 2048
cpus: 2
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/code
to: /home/vagrant/code
sites:
- map: homestead.test
to: /home/vagrant/code/public
databases:
- homestead
features:
- mysql: false
- mariadb: false
- postgresql: false
- ohmyzsh: false
- webdriver: false
#services:
# - enabled:
# - "postgresql@12-main"
# - disabled:
# - "postgresql@11-main"
# ports:
# - send: 50000
# to: 5000
# - send: 7777
# to: 777
# protocol: udp
~ 代碼: 選擇全部
vagrant upCheck your Homestead.yaml (or Homestead.json) file, the path to your private key does not exist.
參考資料:https://stackoverflow.com/questions/444 ... stallation
The file simply needs to exist. – Jake Wilson Feb 27 '18 at 6:24
原因:~/.ssh/id_rsa不存在
代碼: 選擇全部
touch ~/.ssh/id_rsa
vagrant up