Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Hadoop uses VMware to prepare the process of building three identical Linux virtual machines

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article is about Hadoop using VMware to prepare three identical Linux virtual machines to build, the editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article.

Introduction: VMware can run two or more Windows, DOS, LINUX systems on a local notebook machine. VMWare uses a completely different concept than a "multi-boot" system. The multi-boot system can only run one system at a time, and the machine needs to be restarted when the system is switched over. VMWare is really running "at the same time", with multiple operating systems switching on the platform of the main system, just like standard Windows applications. And each operating system you can carry on the virtual partition, the configuration without affecting the real hard disk data, you can even connect several virtual machines to a local area network with the network card through the network card, which is extremely convenient. The performance of the system installed on the VMware operating system is much lower than that installed directly on the hard disk, so it is more suitable for learning and testing.

The environment is prepared as follows:

Because there is no physical machine to do testing, to learn hadoop to build the environment, in the local notebook to do a few linux virtual machines is a good choice.

Linux virtual machine ISO:CentOS-6.2-x86_64-bin-DVD1.ISO,CentOS-6.2-x86_64-bin-DVD2.ISO.

Virtual machine platform server version: VMware-workstation-full-10.0.1-1379776.exe

PS: about the software, if you need to leave a message and leave me a contact information, you can have it at share. The description of the software is as follows:

Local notebook: T430Igraine 6G memory, 64-bit operating system, configured as follows:

Here are the detailed steps:

1. Install VMware-workstation, import Centos, and build a linux virtual machine using ISO.

2, select the path

3. Select multicore

4, select 1GB of memory

5. Choose the way to connect the bridge

6. Select disk Istroke O mode.

7, create a brand new virtual machine

8, select the disk type

9, virtual machine file storage method

10. Set the virtual machine file storage path

11, complete the opening, and the error is as follows:

Could not prepare the install disc at E:\ software\ wmware\ CentOS-6.5-x86_64-bin-DVD1.iso. Make sure that you are using a valid Linux install disc. If the error persists,you may need to reinstall VMware Workstation.

The reason is that the notebook does not have the virtual machine function option, restart the notebook T430i, then press and hold the F1 key to enter the BIOS setting, find the Virtual option, set it to enable, and then save and exit.

Open the error report: EDD: Error 8000 reading sector 2073976

The reason is: VMware Workstation 9, the version is too old, upgrade to version 10, then OK.

12, set up virtual machine network connection

12.1, verify virtual machine network connectivity

[root@name01 ~] # ping www.baidu.com

Ping: unknown host www.baidu.com

[root@name01 ~] #

[root@name01] # ping 115.239.211.110

Connect: Network is unreachable

[root@name01]

12.2. Set the connection mode to NAT mode

To see if you can access the public network, left-click the wireless icon in the lower right corner of the notebook, and then click to open the Network and sharing Center, close VMnet01, keep only VMnet08, and then use the default ip address of IPv4 192.168.52.1.

(1) set up by yourself

Now start the virtual machine, enter the virtual machine operating system, set the network connection of the virtual machine, set the IP to 192.168.52.11, the subnet mask to 255.255.255.0, the gateway to 192.168.52.1 (the gateway is the IP address of the VMware Network Adapter VMnet8 virtual network card), the DNS to the DNS of the host network connection, (the DNS that we connect to the external network, I use the wireless network connection So I found the DNS of the wireless network connection, and if it's a broadband connection, it's a locally connected DNS), as follows:

[root@name01 ~] # vim / etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0

BOOTPROTO=none

HWADDR=00:0c:29:ae:6b:a7

IPV6INIT=yes

NM_CONTROLLED=yes

ONBOOT=yes

IPADDR=192.168.52.11

NETMASK=255.255.255.0

TYPE=Ethernet

GATEWAY=192.168.52.1

DNS1=192.168.180.254

USERCTL=no

[root@name01 ~] #

Then restart network

[root@name01 ~] # service network restart

Shutting down interface eth0: Device state: 3 (disconnected)

[OK]

Shutting down loopback interface: [OK]

Bringing up loopback interface: [OK]

Bringing up interface eth0: Active connection state: activating

Active connection path: / org/freedesktop/NetworkManager/ActiveConnection/1

State: activated

Connection activated

[OK]

[root@name01 ~] #

(2) automatically set the network in dhcp mode

[root@name01 ~] # cat / etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0

BOOTPROTO=dhcp

HWADDR=00:0c:29:ae:6b:a7

ONBOOT=yes

TYPE=Ethernet

[root@name01 ~] #

Restart the network service

[root@name01 ~] # service network restart

Shutting down interface eth0: Device state: 3 (disconnected)

[OK]

Shutting down loopback interface: [OK]

Bringing up loopback interface: [OK]

Bringing up interface eth0: Active connection state: activating

Active connection path: / org/freedesktop/NetworkManager/ActiveConnection/3

State: activated

Connection activated

[OK]

[root@name01 ~] #

(3) verify the network and download the lib package using wget, as follows:

[root@name01 ~] # wget http://ftp.gnu.org/gnu/glibc/glibc-2.12.1.tar.gz

-- 2014-08-20 03 Fraser 03RV 38 Mi-http://ftp.gnu.org/gnu/glibc/glibc-2.12.1.tar.gz

Resolving ftp.gnu.org... 208.118.235.20, 2001:4830:134:3::b

Connecting to ftp.gnu.org | 208.118.235.20 |: 80. Connected.

HTTP request sent, awaiting response... 200 OK

Length: 21119201 (20m) [application/x-gzip]

Saving to:? .libc-2.12.1.tar.gz?

21119201 89.1K/s in 7m 23s

2014-08-20 03:11:03 (46.6 KB/s)-.libc-2.12.1.tar.gz?.saved [21119201 / 21119201]

[root@name01 ~] #

[root@name01 ~] # ping www.baidu.com

PING www.a.shifen.com (58.217.200.15) 56 (84) bytes of data.

64 bytes from 58.217.200.15: icmp_seq=1 ttl=128 time=281 ms

64 bytes from 58.217.200.15: icmp_seq=2 ttl=128 time=223 ms

64 bytes from 58.217.200.15: icmp_seq=3 ttl=128 time=1925 ms

64 bytes from 58.217.200.15: icmp_seq=4 ttl=128 time=1166 ms

64 bytes from 58.217.200.15: icmp_seq=6 ttl=128 time=318 ms

^ C

-www.a.shifen.com ping statistics

6 packets transmitted, 5 received, 16% packet loss, time 5646ms

Rtt min/avg/max/mdev = 223.089 ms, pipe 2

[root@name01 ~] #

OK, the connection to the public network of the virtual machine was set successfully.

13, clone another virtual machine exactly the same

Install all the necessary software on the first virtual machine, such as jdk, such as mysql, such as openssl, such as yum, such as python, and so on. Then through the unique clone function of vm, the Nth virtual machine can be copied quickly.

13.1, click "manage (M)" in the right-click pop-up menu on the virtual machine name02, and then click the right drop-down menu "Clone (C)", as follows:

13.2, proceed to the next step

13.3, select create complete clone (F)

13.4, set the name and until, click finish

13.5, start replication, take a long time, wait patiently, as follows

Click the close button to complete this clone.

Using the same method, another data02 for clone comes out, as shown in the following figure:

OK, the last three virtual machines with exactly the same configuration have been built.

This is how Hadoop uses VMware to prepare three identical Linux virtual machines. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report