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
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.
Because the production environment currently uses 7 more, choose the 7 version to download.
Choose the Alibaba Cloud mirror site to download:
use the standard DVD mirror file.
After the download is complete, put the image file in advance in the cluster folder we want to prepare, about 4G files:
3 Create a virtual machine
After preparing VMware and CentOS, you can create a virtual machine, just follow the procedure below:
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:
then click to open this virtual machine for simple system settings:
after the installation is complete, set the language and time zone: the
software can be selected in addition to a graphical interface Then install some development tools. If the
installation location is to select the default automatic partition allocation:
click to confirm the installation, and then set the root password
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:
click Finish configuration.
Set up a user and password :
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=no
modified 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.
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:
and then enter the ifcfg-ens33 file again . 将BOOTPROTO=dhcp修改为BOOTPROTO=static
, And then add the specified static IP, gateway and other configurations:
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:
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:
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: