I. Download and installation of VMware
Download VMware
Install VMware: Next
Second, the download and installation of CentOS
Download CentOS
Installation of three CentOS 64-bit virtual machines (Master slave1 slave2)
When you build Hadoop, Master will act as the Namenode node, with two slave as the Datanode node
Each virtual machine I allocated 1G memory 20G HDD
When you install a virtual machine, you can choose to install minimal mode without an interface, run faster, and save memory.
Network mode can choose NAT mode, easy to set the static network address later
The procedure for installing a virtual machine can refer to the following URLs:
Http://www.linuxidc.com/Linux/2014-02/97389.htm
Third, the configuration of the virtual machine 1. Installing VMware Tools
VMware Tools is installed to enable shared folders between native and virtual machines, as well as direct copy-paste and drag-and-drop functions
(1) Select a virtual machine, click on the virtual machine on the menu bar and install VMware Tools
If you are installing a virtual machine with a user interface, automatically opens a location that contains the VMware installation package
If you are installing a virtual machine without a user interface, you will need to manually execute the following command to display the location of the VMware installation package
Mkdir/mnt/cdrom Mount/dev/cdrom/mnt/cdrom
Cd/mnt/cdrom
(2) Extract the installation package (compressed file ending in tar.gz) to a directory with permissions (e.g. User directory)
TAR-ZXVF vmwaretools-9.6.0-1294478.tar.gz-c ~
(3) Enter the extracted folder to install
CD Vmware-tools-distrib./vmawre-install.pl
Note: If the installation is not possible, Perl may not be installed, just run the Yum install Perl before installing Perl./vmawre-install.pl
(4) Installation process all the way to enter, the installation will need to restart the virtual machine to take effect
2. Setting up a shared location Set up a shared location between the virtual machine and the host so that the host and the virtual machine keep the files synchronized for easy operation and synchronization
Set up three virtual machines to share a directory with the same host, you can synchronize files between the host and the virtual machine and between different virtual machines
For each virtual machine, click on VMware on the virtual machine (right)-and set-up options, select shared folder, permanently share, add a native directory to the shared directory, and give this share a name, for example called share. This will automatically generate the share folder on the virtual machine and keep it in real time with the directory on the host, and the restart takes effect./mnt/hgfs
3. Set the static IP address
Since our computer is connected to a new WiFi environment, the virtual machine address changes often occur (the default DHCP assigned IP address), we can set the address of the virtual machine to a static
(1) Click on the menu bar to edit the virtual Network Editor in the dialog box that appears select VMnet8 Nat mode, view the subnet address, here is 192.168.208.0
(2) Click on the NAT settings below to view the gateway address, here I am 192.168.208.2
(3) Select a virtual machine, modify the configuration file
Vi/etc/sysconfig/network #添加GATEWAY为上一步网关的地址
Vi/etc/sysconfig/network-scripts/ifcfg-eth0
(4) Restart the virtual machine in effect
4. Using Xshell client to access virtual machine Xshell is a particularly useful Linux remote client, with many quick features that are much more convenient than simply manipulating commands in a virtual machine.
(1) Download and install Xshell
(2) Click on the menu bar--New, enter the name and IP address of the virtual machine and determine
(3) Accept and save
(4) Enter user name and password (auto-save)
At this point, three virtual machines have been built, the next one we will specifically build Hadoop cluster, please look forward to ~