vagrant up (attached: command encyclopedia)


"SpringCloud Nginx High Concurrency Core Programming" Environment Setup-Series

Component link address
Windows centos virtual machine installation & pit pit vagrant+java+springcloud+redis+zookeeper mirror download (& detailed production))
Centos mysql installation & pit pit centos mysql notes (contains vagrant mysql mirror)
Linux kafka installation & pit pit Kafka springboot (or springcloud) integration
Linux openresty installation Linux openresty installation
[Required] Linux Redis installation (with video) Linux Redis installation (with video)
[Required] Linux Zookeeper installation (with video) Linux Zookeeper installation, with video
Windows Redis installation (with video) Windows Redis installation (with video)
RabbitMQ offline installation (with video) RabbitMQ offline installation (with video)
ElasticSearch installation, with video ElasticSearch installation, with video
Nacos installation (with video) Nacos installation (with video)
[Required] Eureka Getting started with Eureka with video
[Required] Getting started with springcloud Config, with video Getting started with springcloud Config with video
[Required] SpringCloud scaffolding packaging and startup SpringCloud scaffolding packaging and startup
Linux self-start, suspended animation, self-start, timed self-start Linux self-starting suspended animation

1 What is vagrant

We must first sharpen our tools. The development environment and development tools are the swords of our developers, so we need a fast and easy-to-use sword

**Vagrant:** is a more popular virtual machine management software. Using Vagrant allows us to download the image of the virtual machine directly from the cloud with commands, and then create and manage it.

When I first started development, I configured the development environment on my own computer. As we came into contact with more and more things, slowly, there were various environments on the computer, such as php, java, python, nodejs. Wait, it's very troublesome, and the computer is often reinstalled for some reason, ORZ, so the environment has to be reset. Therefore, it is very important to create a mobile environment that belongs to you.

Vagrant is a tool for building a virtual development environment. It supports window, linux, mac, and there is always one suitable for you. And vagrant can package the configured environment into a box and share it with others for direct use, which is very convenient

Vagrant is a virtual environment deployment tool that is very suitable for developers. It integrates mainstream virtualizer management tools and supports vmvare and virtualbox.

The essence of vagrant is in a Vagrantfile, which is functionally the same as docker's Dockerfile. We only need to write the steps that need to be installed and deployed in the Vagrantfile to achieve easy deployment. Vagrant also supports making the current system into a mirror named with a .box suffix, similar to docker's image, which can easily implement environment transplantation.

Therefore, using vagrant can define complex virtual frameworks on systems running multiple VMs. A Linux development environment can be packaged through Vagrant and distributed to team members. Members can develop programs on their favorite desktop systems (Mac/Windows/Linux), but the code can run in a packaged environment, which is very domineering. Isn't it cool?

2 Preparation:

What is: springcloud.box mirror

Crazy Maker Circle has prepared a springcloud.box image for everyone, pre-installed with necessary components such as java, redis, zookeeper, kafka, Eureka, springcloud config and so on. For the network disk address, please see [ Blog Park General Entrance ]

Insert picture description here

3 Use vagrant to make a Java development environment

5 Configure the virtual machine through Vagrantfile:

6 vagrant basic commands

Official website document: https://docs.vagrantup.com/v2/getting-started/index.html

vagrant init initialize vagrantfile

vagrant add box Add box, automatically generate vagrantfile for you

vagrant up starts the virtual machine

$   vagrant up cdh1  #指定cdh1节点

vagrant halt shuts down the virtual machine

vagrant destroy destroy the virtual machine

vagrant ssh to connect to the virtual machine

vagrant reload reload the vagarntfile file

vagrant suspend temporarily suspends the virtual machine

vagrant status View the running status of the virtual machine

vagrant package package box file

vagrant box list First check the boxes that have been added:

user@DESKTOP-FJ882IS MINGW64 /e/virtual/work
$ vagrant box list
centos (virtualbox, 0)

7 Virtual machine cluster

Back to ◀ Crazy Maker Circle

Crazy Maker Circle-Java high-concurrency research community, open the door to big factories for everyone

Guess you like

Origin blog.csdn.net/crazymakercircle/article/details/111884992