Now a days we all are familiar about visualization using Vmvare, Virtual boxes.
Here i am demonstrating how to Setup magento 1.9.0.1 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
#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
#wget http://files.vagrantup.com/packages/0219bb87725aac28a97c0e924c310cc97831fd9d/vagrant_1.2.4_i686.deb
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 https://vagrantcloud.com/discover/featured
to add a box run
#vagrant box add precise32 http://files.vagrantup.com/precise32.box
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
“config.vm.network :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 :-
* 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).
* Fill the admin details according to you.
The above image is the backend login via admin.
Be the first to comment.