Because I use the redhat version of linux, I can't use the yum command, and there are still various problems when I change its resp to centos, so I installed centos directly.
Step 1: Modify the network connection method in the virtual machine configuration and select "Custom (specific virtual network) / NAT mode"
The second part, set a static ip
Still the same as redhat, first configure the range of static ip according to the "Edit" - ""Virtual Network Editor" on the home page of the VM.
As can be seen from the above screenshot, we need to configure the ip access to the system in the virtual machine as long as it is 192.168.80.0 to 192.168.80.254
This range is fine. At that time, because 192.168.80.254 (DBCP ip), 192.168.80.2 (gateway ip), and 192.168.80.0 (subnet IP) were no longer available, others could be used. According to this idea we modify
The third is to log in with the root account, enter the command line page, and modify the network card configuration ifcfg-eth0
vi /etc/sysconfig/network-scripts/ifcfg-eth0
BOOTPROTO This is to indicate whether to obtain IP dynamically or statically, I am static here
IPADDR: Specifies the ip address of the current virtual machine
GATEWAY: Specify the gateway ip
NDS1: Specify the domain name server address, which is generally the same as the gateway ip. It must be set or it cannot connect to the external network.
No changes are required elsewhere.
Use yum command to download and install ruby
yum install ruby