Professional Documents
Culture Documents
Vagrant in Ubuntu
Vagrant in Ubuntu
PHP (Scripting Language). It is an open-source Web development environment which lets you
create web applications. It is generally also referred as Web Stack.
Let us now setup LAMP development environment in Vagrant with below steps:
#1- Create a directory where we would be creating the instance:
mkdir -p ~/Vagrant/lamp
cd ~/Vagrant/lamp
#2- Now we are required to initialize the Vagrant box. Here we are left with two options.
#2.1- One, we can re-use Ubuntu 12.04 LTS (Precise Pangolin) box, which we have already
downloaded in the previous tutorial. To use this, just do:
vagrant init precise32
#2.2- Second option we have is to do a fresh addition of the box by downloading the Ubuntu
12.04 LTS (Precise Pangolin) Vagrant box, as:
vagrant box add precise32 http://files.vagrantup.com/precise32.box
And then do:
vagrant init precise32
Please note- #2.2 is only for those who have not downloaded the Ubuntu 12.04 LTS (Precise
Pangolin) Vagrant box previously.
#3- Now do:
vagrant up
This will create a VagrantFile. Edit the VagrantFile as below:
Vagrant.configure(2) do |config|
config.vm.box = "precise32"
# Mentioning the SSH Username/Password:
config.ssh.username = "vagrant"
config.ssh.password = "vagrant"
# Begin Configuring
config.vm.define "lamp" do|lamp|