What's the Vagrant ?
How to Set Up Vagrant on Ubuntu Desktop?
Vagrant
is a application which improved your application in virtual machine, this means that,
you can create your project environment on virtual machine. Thanks to vagrant, you cloned local environment on virtual machine.
So, when you sent to your project to server
, you can’t see any bug or error on your server.
On the other hand vagrant is useful, while you are working in a team.
For the install and use vagrant, you should follow below steps respectively.
Let’s look, how to set up and use Vagrant in Ubuntu desktop
,
- Install Vagrant
- Create Vagrant Folders
- Install Precise32 Box
- Set up new Virtual Machine
- Install Virtual Machine configuration
1) Install Vagrant
For the install vagrant on your Ubuntu desktop is very easy. Open your terminal and write below command.
1 2 |
|
2) Create Vagrant Folder
Continue on terminal, write below commands,
1 2 3 |
|
3) Install Precise32 Box
Precise32 box is important on ubuntu desktop, because thanks to this box you can modify your virtual machine.
1 2 3 |
|
After install, you can check with,
1 2 |
|
4) Create New Virtual Machine
For create new virtual machine, you should initialize precise32 box,
1
|
|
When you wrote above command, you get warning about it, this means include Vagrantfile
.
5) Install Virtual Machine configuration
1
|
|
You should configure permission for virtual machine configuration
1
|
|
- Run the virtual machine with
1
|
|
- Connecting with virtual machine
1 2 3 4 5 6 7 8 |
|
- Run virtual machine configuration,
1 2 |
|
you should enter a password for commands above.
If you finish work on virtual machine, you write below commands for exit or turn off virtual machine
1 2 3 |
|
Or if you want to remove all things from virtual machine
1
|
|
But for the built again to your project only below commands it’s enough.
1
|
|
- When I say
Vagrant
is useful for working in a team, look Vagrant Cloud.
You can create account and share your vagrant environment with anyone with vagrant cloud
.
After create your account, open your terminal,
1 2 |
|
Write email or username and password for vagrant cloud, then
1
|
|
For more detail about Vagrant, you can look ;
That’ s all.
I hope helped you .