Cov txheej txheem:

Kuv yuav khiav Vagrantfile li cas?
Kuv yuav khiav Vagrantfile li cas?

Video: Kuv yuav khiav Vagrantfile li cas?

Video: Kuv yuav khiav Vagrantfile li cas?
Video: XENGYAMG - Noj Tshoob Tas Kuv Yuav Khiav [Official Music Audio] 2024, Kaum ib hlis
Anonim

Pib dua nrog VirtualBox thiab Vagrant

  1. Nruab VirtualBox.
  2. Nruab Vagrant.
  3. Tsim ib daim ntawv teev npe hauv zos rau Vagrant.
  4. Tsim ib Vagrantfile hauv koj phau ntawv teev npe tshiab.
  5. Khiav vagrant thiab muab koj lub tshuab virtual.

Yog li ntawd, kuv yuav siv Vagrantfile li cas?

Koj ua tau siv vagrant nce thiab vagrant ssh tso tawm thiab nkag mus rau hauv lub tshuab virtual, tom qab ntawd tsim cov ntawv xeem hauv / vagrant phau ntawv. Siv cov lus txib tawm mus kaw qhov kev sib tham SSH, tom qab ntawd siv ls los sau cov ntsiab lus ntawm koj vagrant -test directory. Nws yuav tsum tso saib cov ntawv xeem koj tsim.

Ib tug kuj yuav nug, Vagrantfile yog dab tsi? Cov Vagrantfile yog Ruby cov ntaub ntawv siv los teeb tsa Vagrant nyob rau hauv ib qhov project. Lub luag haujlwm tseem ceeb ntawm lub Vagrantfile yog piav qhia txog cov tshuab virtual uas xav tau rau ib qhov project thiab yuav ua li cas los teeb tsa thiab muab cov tshuab no.

Cov lus nug tseem yog, Kuv yuav qhib cov ntaub ntawv Vagrantfile li cas?

Qhib Vagrantfile nyob rau hauv cov ntawv nyeem zoo li Notepad ++ lossis Sublime thiab saib, kawm cov lus ua ntej txhua tus nqi teeb tsa. Koj tuaj yeem teeb tsa cov folders sib koom ntawm cov qhua thiab tus tswv tsev, qhib qhov chaw xa mus, teeb lub hostname, thiab ntau dua.

Kuv yuav khiav vagrant ntawm Linux li cas?

Yuav Ua Li Cas Teeb Vagrant ntawm Linux los tsim Virtual Dev Ib puag ncig

  1. Nruab Vagrant. Ua ntej, rub tawm lub vagrant binaries rau koj OS los ntawm VagrantUp.
  2. Ntxiv lub Vagrant Box. Cov kauj ruam tom ntej yog khiav "vagrant box add" hais kom ua.
  3. Pib Vagrant Box.
  4. Tus kws kho mob nyob ntawm.
  5. Pib thiab nres Vagrant.
  6. Nkag mus rau Vagrant Virtual Machine.
  7. Reload Vagrant.

Pom zoo: