$ sudo apt-get -y install vagrant
$ vagrant box add lucid32 http://files.vagrantup.com/lucid32.box
$ vagrant init lucid32
$ vagrant up
$ vagrant ssh
After running the above two commands, you'll have a fully running virtual machine in VirtualBox running Ubuntu 12.04 LTS 32-bit. You can SSH into this machine with vagrant ssh, and when you're done playing around, you can remove all traces of it with
$ vagrant destroy
To have vagrant with LAMP stack ready for developing, use my Vagrant script here: https://github.com/shnigi/Vagrantbox
It has private IP set to 192.168.33.15. Then edit your /etc/hosts file and add for example:
192.168.33.15 mypage.dev
Then you can use your host computer and type mypage.dev and it redirects to your vagrant host apache page. It should also add /var/www as a shared folder so you can copy and paste files directly to your vagrant box.
Ei kommentteja:
Lähetä kommentti