Home > Operation and Maintenance > Linux Operation and Maintenance > Detailed explanation of how to quickly clone multiple Linux environments under VMware

Detailed explanation of how to quickly clone multiple Linux environments under VMware

黄舟
Release: 2017-05-27 10:03:57
Original
1781 people have browsed it

This article mainly introduces you to the method tutorial of quickly cloning multiple Linux environments under VMware. The introduction in the article is very detailed and has a great reference and learning value for everyone. Friends who need it can follow Let’s take a look together.

Why clone multiple Linux systems?

Because I want to play. In fact, no, it’s just for fun. Play with a database master-slave, a cache cluster, a distributed message cluster, and various distributed services. If you want to simulate an almost real environment, just You must have multiple machines. If you want to have multiple machines, there are only two ways: buy one or install a virtual machine.

You now want to simulate three machines to implement distributed services. How do you install the environment?

After you install a Linux system in VMware, of course you can choose to install the next one and the next one, there is no problem! However, you need to install various software on each machine, such as: JDK, Tomcat, Nginx. I have an extremely convenient way, which is to use cloning to quickly get multiple machines with the same environment.

Just do it, don’t talk nonsense

Of course, first you need to have installed VMware and a Linux system, the rest Virtual machines and systems are also available. I am using:

  • VMware Workstation 12 Pro

  • Red Hat Enterprise Linux 7 64-bit

1. Clone the environment you want to clone

In fact, after opening VMare, close or suspend the environment you want to clone Machine, then right-click and select [Manage]-[Clone]:

The rest are Next and Next, but at this point select [Clone] Method] should pay attention to it, it is best to choose the following [Create a complete clone], because this will not depend on your original environment:

The next name and location Fill it out yourself. Just finish it.

2. Simply configure your cloned environment

Since you used cloning, all the cloned environments will be exactly the same as the original ones, including the host name, IP address, MAC address, etc., so there are only a few small problems to be solved.

On your cloned machine, right-click and select [Settings]-[Network Adapter]-[Advanced], click the [Generate] button and record the MAC address, as follows Picture:

Then it starts.

Editifcfg-eno16777736 file. Under Linux 7, this file stores network card and IP information. Command:

vim /etc/sysconfig/network-scripts/ifcfg-eno16777736
Copy after login

Change the IPADDR and HWADDR to yours The desired IP and the MAC just generated, as shown below:

Then restart the network card. Command: service network restart.

Of course, I set the static IP here before cloning. If you obtain it automatically, there should be no IP conflict. If you have modified the Hostname, you should also modify it accordingly.

To summarize

VMware is a very simple small feature, which greatly increases our interest in playing virtual machines, but many people I didn't find it, so I'll just write it down. I hope it's useful to you.

The above is the detailed content of Detailed explanation of how to quickly clone multiple Linux environments under VMware. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template