|
Version is CentOS-Minimal
Install CentOS 1.VirtualBox under.
New Virtual Machine
Download CentOS, put the disk, start the virtual machine, follow the prompts to start the installation (recommended memory 1G, 10G hard disk above)
2. Set Network
First you set the Bridge mode on a virtual machine (also called bridge card), easy to test
In this mode, the virtual machine and the host (native) in a network, the same network segment, and true testing environment is basically the same .....
The need to see whether the support network environment does not support, you can only use the NAT mode, NAT mode, the default status of the machine can not access the virtual machine (virtual machine can access the same network as the machine and the machine), port mapping can be used to solve It is trouble spots
Open the card settings
# Virtual NIC name enp0s3
vi / etc / sysconfig / network-scripts / ifcfg-enp0s3
Configuration is as follows:
TYPE = Ethernet
BOOTPROTO = static
DEFROUTE = yes
IPV4_FAILURE_FATAL = no
IPV6INIT = yes
IPV6_AUTOCONF = yes
IPV6_DEFROUTE = yes
IPV6_FAILURE_FATAL = no
NAME = enp0s3
UUID = 757a3204-8973-435f-9138-70c569d159ab
DEVICE = enp0s3
ONBOOT = yes
PEERDNS = yes
PEERROUTES = yes
IPV6_PEERDNS = yes
IPV6_PEERROUTES = yes
IPV6_PRIVACY = no
IPADDR0 = 192.168.1.20
PREFIX0 = 24
GATEWAY0 = 192.168.1.10
DNS1 = 8.8.8.8
DNS2 = 8.8.4.4
Note ONBOOT = yes, if set to no, each time after starting (including restarting the network), we must start with the command ifup enp0s3 about NIC
Save and exit, then restart the network services
# Restart network module
service network restart
3. Install the necessary software
yum install gcc.x86_64 glibc.x86_64 glibc-devel.x86_64 vim-enhanced.x86_64
4. ssh login to solve the problem of slow
# Ssh open configuration,
vim / etc / ssh / sshd_config
The #UseDNS yes UseDNS no change
# Restart sshd service
systemctl restart sshd.service |
|
|
|