[Distributed cluster construction one] Virtual machine configuration (VMware+Centos7+SecureCRT+AppNode)

When preparing the environment, I decided to use VMware+Centos7+SecureCRT+AppNode to build and manage virtual machines.

1 Install VMware

You can download it directly from the VMware official website : select the one on the left when downloading, the latest version when I downloaded it was 15.5 (2020.8.30). After the
Insert picture description here
download is complete, you can install it directly according to the default installation process.

2 Download Centos image

You can download it directly from the Centos official website , and select CentOS Linux when downloading.
Insert picture description here
Because the production environment currently uses 7 more, choose the 7 version to download.
Insert picture description here
Choose the Alibaba Cloud mirror site to download:
Insert picture description here
use the standard DVD mirror file.
Insert picture description here
After the download is complete, put the image file in advance in the cluster folder we want to prepare, about 4G files:
Insert picture description here

3 Create a virtual machine

After preparing VMware and CentOS, you can create a virtual machine, just follow the procedure below:

Insert picture description here
Insert picture description here
Insert picture description here
Insert picture description here
Insert picture description here

Insert picture description here
At this point we can understand that I bought a computer, but I haven’t installed an operating system yet

4 Configure the CentOS system for the virtual machine

Enter VMware, find the current virtual machine, edit the virtual machine settings, install the operating system:
Insert picture description here
then click to open this virtual machine for simple system settings:
Insert picture description here
after the installation is complete, set the language and time zone: the
Insert picture description here
Insert picture description here
software can be selected in addition to a graphical interface Then install some development tools. If the
Insert picture description here
installation location is to select the default automatic partition allocation:
Insert picture description here
click to confirm the installation, and then set the root password
Insert picture description here

Insert picture description here
This completes the installation of the virtual machine operating system.

5 Configure the CentOS system for the virtual machine

After the installation is complete, restart the virtual machine, you can see the following three options, just confirm the first option:
Insert picture description here
Insert picture description here
click Finish configuration.
Insert picture description here
Insert picture description here
Set up a user and password :
Insert picture description here
Insert picture description here

6 Configure the network for the virtual machine

Perform the following operations in the terminal to enter the network configuration page [Note, you need to enter the operation under the root user]

cd /etc/sysconfig/network-scripts/

Then edit the configuration file:

vi ifcfg-ens33

You can see the following configuration content:

TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=dhcp
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=ens33
UUID=1054c447-44a6-4c41-a88a-bf14507d53cc
DEVICE=ens33
ONBOOT=no

Will be ONBOOT=nomodified to ONBOOT=yes. Restart network settings after modification:

service network restart

After restarting, you can see that the network has been successfully connected. The virtual machine has automatically obtained the IP 192.168.5.130 and can connect to the external network.
Insert picture description here
Next, we need to configure the static network address, and we need to modify the network address and set the static IP and gateway. Click on Vmware's virtual network editor to edit:
Insert picture description here
and then enter the ifcfg-ens33 file again . 将BOOTPROTO=dhcp修改为BOOTPROTO=static, And then add the specified static IP, gateway and other configurations:

Insert picture description here
The final configuration is as follows:

BOOTPROTO=static
BROWSER_ONLY=no
DEFROUTE=yes
DEVICE=ens33
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_ADDR_GEN_MODE=stable-privacy
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
NAME=ens33
ONBOOT=yes
PROXY_METHOD=none
TYPE=Ethernet
UUID=1054c447-44a6-4c41-a88a-bf14507d53cc
IPADDR=192.168.5.102
GATEWAY=192.168.5.2
NETMASK=255.255.255.0

Restart network settings after configurationservice network restart

7 View network node information

After the virtual machine is fully set up, we need a more intuitive management tool to view it. Here I use APPNode to clearly view the node information, and operate the following command in the terminal to install APPNode

INSTALL_AGENT=1 INSTALL_APPS=sitemgr INIT_SWAPFILE=1 INSTALL_PKGS='nginx-stable,php56,mysql56' bash -c "$(curl -sS http://dl.appnode.com/install.sh)"

Set the corresponding user name and password during the installation process, and finally get a set of site and domain information. After logging in according to the account and password, you can see the following information:
Insert picture description here
In fact, you can also install AppNode first and then configure the network, because those configuration file modifications can be done in AppNode carry out:
Insert picture description here

8 Use SecureCRT for terminal operation

Of course, when we get to this step, we still need a software, that is SecureCRT. The purpose of this software is to make it easy for us to operate multiple linux terminals on our own windows and download it directly from the [SecureCRT official website] . After the download is complete, connect to our virtual machine:
Insert picture description here

Guess you like

Origin blog.csdn.net/sinat_33087001/article/details/108308688