Build distributed clusters with VMware

Source: Internet
Author: User

Objective:

We need at least 3 servers to be distributed, and given that there is not much money to buy real machines, from the point of view of learning and development, only virtual machines are a road. Software Selection:Virtual machines use VMware software because they are more mainstream and more informative and less expensive to learn.    Software in the "Link: http://pan.baidu.com/s/1jI4pppc Password: zvtt", the crack file is also inside. There is no doubt that the virtual OS is Linux, and since CentOS is open source, the download is convenient and does not need to be cracked. 【? Centos-7-x86_64-everything-1511.iso "In addition to the Redhat version" Shrike-i386-disc2.iso ", CentOS is an open source system, you can go to the official website to download. OS Installation:New virtual machine, usually the default, just need to select the image file and virtual machine configuration, master host can memory hard disk slightly larger 3/20, the other can not be too big 1/15, see how much memory you.    When you create a hard disk, you can choose a fixed capacity mode, pre-occupied can prevent the virtual machine hard disk later occupancy is infinite, but if it does not use such a large space, the rest of the waste. After a series of Setup, enter the VM and start the OS installation. Select the language and region, then select the installation options, network configuration, and so on. The virtual machine cluster requires a maximum of one with a UI interface, as some development tools may need to be installed.     Select as simple as possible and need to install it yourself (minimum installation). The installation process can not need to configure the network and users only need to set the root password after installation to enter the system settings, for some plug-ins may need to accept the protocol, select 1/2,continue, as long as the correct option is selected, the other does not need to restart the tube.  set up the network (static IP, in order to facilitate the connection of the extranet, using NAT rather than bridging): 1. Network adapter settings: The virtual machine has a virtual machine NIC, and in the network connection adapter, manually set the virtual machine IP, including the subnet mask and gateway. The gateway can be considered as: the first 3 digits are consistent with the IP, and the last is in most cases 2. This gateway manages all the IP for this network segment. or the gateway to map the IP in the network. Virtual Network editor for 2.VMware:Select the virtual network Editor in the editor, if not, add one, the connection method is NAT, do not use DHCP automatic IP, subnet IP within this network segment is OK? In NAT settings, set the correct IP, gateway, subnet mask
The port mapping should be to set up some special ports, which are not used here temporarily. In this way, the virtual network is set up. You need to add this virtual network to the virtual OS later. 3. Settings for the virtual OSThrough the above settings, the external environment has been set up, the following need to set up a virtual machine network card.Reference:"Http://www.centoscn.com/CentosBug/osbug/2015/1224/6568.html "" http://www.cnblogs.com/magialmoon/archive/2013/08 /10/3250393.html "http://www.linuxidc.com/Linux/2013-07/86881.htm" Step:
ifconfig-a if the command is not available, use IP addr to find the network card name, ENS33, eth0, and so on in the results. Here is the name of the NIC before ens34vi/etc/sysconfig/network-scripts/ifcfg-. Enter the content in the network card "reference contains details" Finally need to modify/etc/sysconfig/network

Measurement can be the host can ping the virtual machine, the virtual machine can ping Baidu, set up complete. System Software InstallationGUI interface: Install Vmtools, can implement the machine to the virtual machine transfer files, click Install can, the principle is as long as can drag files on the line, do not need to manually install the bare console in the virtual machine is the smallest installation, many features are not. No mouse causes the console to be almost unusable. The solution is as follows: first through the IP addr Get network card information, refer to the above network configuration, transfer network. Next:
Yum install-y gpmchkconfig-add gpm--optional reboot The problem is that the mouse pointer delay is too high and the usability is very poor.

Although the mouse comparison card, but fortunately can be connected to the VMOs through the XSHELL/SECURECRT terminal, so there is no bad problem. application Software Installation:Since virtual machines can be cloned, we just need to install what we need on a single machine. Currently there are: Java, the OS with UI can be dragged to the OS via VM tools, and the bare console without the UI can download files from other OS via the SFTP command: sftp:sftp [email protected] Enter the password and get the remote directory local directory    Download the file, or put it to send the file, and finally quit the SFTP. Unpack the Java tar package, preferably under/usr/local.    The file name can be modified by the MV source file name to implement the renaming. Vi/etc/profile Add an environment variable later
Java_home=/usr/local/java/jdk1.7path= $JAVA _home/bin: $PATHCLASSPATH =.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/ Tools.jarexport Java_homeexport Pathexport CLASSPATH
Source/etc/profile make it effective the last java-version to test whether the environment is installed properly. In addition to Java, it is necessary to install software such as Zookeeper and Jstorm, which is written in detail later.   Virtual machine clone, build cluster virtual machine basic software installation, power off, in order to prevent other problems to choose a full clone (see a lot of the difference between full cloning and link cloning, or do not understand), it is recommended to clone a lightweight bare console, because with the UI too large, start too slow. After cloning the virtual machine, follow the previous network settings: IP addr View network card and MAC address, and then in the network card settings,the name of the NIC before vi/etc/sysconfig/network-scripts/ifcfg-,mainly modifies ipaddr address and hwaddr. after setting vi/etc/hosts vi/etc/sysconfig/network and so on, reboot can.  



From for notes (Wiz)



Build distributed clusters with VMware

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.