Back to Top

Setup Magento using vagrant

Updated 8 April 2015

Now a days we all are familiar about visualization using Vmvare,  Virtual boxes.

Here i am demonstrating how to Setup magento on vagrant.

First of all setup vagrant ( I am using Ubuntu 12.04 so all the demonstration is for this Ubuntu version)

(if you don’t want to follow the below steps you install vagrant from the software center of Ubuntu it is also available there.)

1.  first install the virtual box on which vagrant run

Start your headless eCommerce
Find out More

#sudo apt-get install dpkg-dev virtualbox-dkms

2.  Go on the download page of vagrant and download the latest version or you can also use


3. # dpkg -i vagrant_1.2.4_i686.deb (using root)

4. for kernel header

#sudo apt-get install linux-headers-$(uname -r)

5. Now reconfigure the v-box

#sudo dpkg-reconfigure virtualbox-dkms

Now for getting started we need a base box (virtual images) which are available on vagrant cloud

to add a box run

#vagrant box add precise32

you can add boxes of your choice.

Now move to the directory to which you want to make your projects or  a new directory where you want to save the project, run the following commands

#vagrant init (for initialization)

Now Vagrantfile will be created in the directory containing the basic configuration of your box

Then finally bring the VPS running Ubuntu 12.04 up via

#vagrant up

After this you just need to do #vagrant ssh to login the Ubuntu

Now for installing the magento

you need to install lamp-server and phpmyadmin ( i have already installed)

(If you don’t know how to install then please read my previous post for the installation and configuration of lamp-server and phpmyadmin.)

before preceding one more thing you need to do is the bridging the nic

halt your machine with

# halt or suspend

#vim Vagrantfile

uncomment the line

“ :bridged”

save and exit

#Vagrant reload

now unzip the magento zip inside /var/www/

check for the permission for the files

also install php-surl via following command

#sudo apt-get install php5-curl

#/etc/init.d/apache2 restart

then access this file via browser

ip_of_machine/magento or whatever the file name is.

Follow the simple steps of installation of magento.

Enjoy working with magento on vagrant.

Here are the few snapshots for the setup of magento :-

magento_setup_vagrant3* If every thing including permission and the lamp-server and  curl are correctly installed you can see the above image. Also create the database using phpmyadmin (I am assuming that you know how to create a database).

magento_admin_vagrant* Fill the admin details according to you.

magento_setup_vagrant1magento_setup_vagrant2magento_admin_vagrant4The above image is the backend login via admin.

. . .

Leave a Comment

Your email address will not be published. Required fields are marked*

Be the first to comment.

Back to Top

Message Sent!

If you have more details or questions, you can reply to the received confirmation email.

Back to Home