What a fresh day ! Been in setting up back my vagrants on each boxes I love , ror , php and plus nginx. For those who don’t heard about Vagrant , here is the [brief] http://www.vagrantup.com/about.html.
Vagrant can give you a lot of automations and software independent development environment. You don’t need to mass around with xampp,mampp or similar solutions that you ever used in your full stack development.
So how do we install ? You need Virtual Box pre-install in your working machine coz vagrant use VM box technology. Here is the official [instruction] http://docs.vagrantup.com/v2/getting-started/index.html.
And you are up to go. Add a VM image and up. Simply
Do you want primative OSs then ubuntu ? Ok you can get a list of Boxes for Vagrant on hand. But you need to import the image into VM first or you can add via url option before you initiate the vagrant. Simply
After initiating vagrant you will get a minifest file and you can modify the behavoir of your vagrant box. First of all the networking is important. Edit the file with your favorite software.
And you will see the imported box_url configuration and network options for your box.
1 2 3 4 5 6 7 8
Install your favorite webserver and in my case I install apache2. Make ssh into your vm box using vagrant command.
1 2 3 4 5 6
And just test with curl from your terminal whether network between your host and vm box work or not.
If you have done the above guides nicely , you will get a default Apache response back.Now you can configure your box as your VPS management style right where on your machine.
After you have done configuration and setting up development requirements , you can share the vm box with your friends to use as their vagrant box.
[ Synced Folders ]
Oh , yeah. It is insanely cool that you can update the source codes from your host machine rather than in the box. So we can use whatever we like to. Usually the Synced Folder means the folder enclosing the Vagrantfile of current running box. You can configure your webserver’s document root to this synced folder in your box.
1 2 3 4 5 6
That is it . The folder “/vagrant” is synced with your Vagrant directory.
Tin Aung Lin