Linux vagrant Create configuration development environment

Source: Internet
Author: User
Tags centos virtual environment

Vagrant Solve the problem

A little bit of team collaboration development experience should know how important the team collaborative development environment is, at first, everyone's development environment is Windows,max OS X,ubuntu,centos, and so on, our various programmers are so convinced that the program on the "I" machine is really normal. But there is a problem on the line, or a programmer development environment can not run, and often submitted files, due to the differences in directory structure, will lead to false submissions. The heterogeneity of the development environment can cause us to waste a lot of time to solve these development environment problems.
So vagrant can solve the above problems, can realize the development environment of Cross-platform Unified deployment. It can also be done:
1. Edit code environment and run, test environment separation, code in one environment edit, run in another system.
2. Can be free to switch in multiple versions of the program, such as online, QA test version, currently under development
Simple Steps for deploying vagrant
1. Install VirtualBox (since vagrant essentially calls the virtual machine interface to run, Vagrant supports VirtualBox, VMware, etc.)
Download: https://www.virtualbox.org/wiki/Downloads
Select the version of your favorite operating system, install
2. Install vagrant
Download: http://downloads.vagrantup.com/
Select the version of your favorite operating system, install
3. Run the environment through the Vagrant Deployment Program
This is actually vagrant supported operating system mirroring, the essence is to run an operating system in the virtual environment, here is why to install VirtualBox.
Http://www.vagrantbox.es/in here we can find the OS mirrors that we prefer
In addition, vagrant supports remote and local mirroring, as we take CentOS-6.4 as an example

The code is as follows Copy Code
$vagrant box Add Centos-6.4-dev https://github.com/2creatives/vagrant-centos/releases/download/v6.4.2/centos64-x86 _64-20140116.box
$mkdir-P/volumes/mac/vagrant/centos-6.4
$CD/volumes/mac/vagrant/centos-6.4
$vagrant Init Centos-6.4-dev
$vagrant up
$vagrant ssh #登录到虚拟机 (centos-6.4-dev, default username/password are vagrant)
After you log on to the virtual machine, we can deploy the environment like other remote servers. In addition, the host/volumes/mac/vagrant/centos-6.4 will automatically mount to the/vagrant directory of the virtual machine.
Something we can do, such as:
1. Create a standard development environment box, packaging.
In the Intranet deployment vagrant box repo, when there are new students, only need to deploy vagrant, and then through a simple few instructions on the team's standard development environment, quickly start.
2. On-line code, the vagrant package instructions to make box mirroring and attach some shell script (such as the import online database subset or the entire library), you can quickly troubleshoot online operation problems.
3.QA test version, can also be vagrant package instructions to make box mirror, easy to test, eliminating the construction of a special operating environment.
4. Support One vagrantfile configuration file and control multiple machines at the same time

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.