CentOS7 configuration log (VirtualBox)
CentOS-Minimal version
1. Install CentOS in VirtualBox.
Create a VM
Download CentOS, put the disk into the disk, start the VM, and install it as prompted (1 GB memory, 10 Gb hard disk or above recommended)
2. Set the network
First, set the Bridge Mode (also called the Bridge Nic) on the VM to facilitate testing.
In this mode, the virtual machine and the host (Local Machine) are in the same network segment, basically the same as the real test environment .....
This depends on whether the network environment is supported. If it is not supported, you can only use the NAT mode. By default, the local machine cannot access the Virtual Machine (the virtual machine can access the local machine and the local network ), you can use port ing to solve the problem.
Enable Nic settings
# Virtual network card name called enp0s3vi/etc/sysconfig/network-scripts/ifcfg-enp0s3
The configuration is as follows:
TYPE=EthernetBOOTPROTO=staticDEFROUTE=yesIPV4_FAILURE_FATAL=noIPV6INIT=yesIPV6_AUTOCONF=yesIPV6_DEFROUTE=yesIPV6_FAILURE_FATAL=noNAME=enp0s3UUID=757a3204-8973-435f-9138-70c569d159abDEVICE=enp0s3ONBOOT=yesPEERDNS=yesPEERROUTES=yesIPV6_PEERDNS=yesIPV6_PEERROUTES=yesIPV6_PRIVACY=noIPADDR0=192.168.1.20PREFIX0=24GATEWAY0=192.168.1.10DNS1=8.8.8.8DNS2=8.8.4.4
Note that ONBOOT = yes. If it is set to no, you must use the ifup enp0s3 command to start the NIC after each startup (including network restart ).
Save and exit, and then restart the network service.
# Restart the network module service network restart
3. install necessary software
yum install gcc.x86_64 glibc.x86_64 glibc-devel.x86_64 vim-enhanced.x86_64
4. Solve the Problem of slow ssh Login
# Enable ssh configuration, vim/etc/ssh/sshd_config
Change # UseDNS yes to UseDNS no
# Restart sshd service systemctl restart sshd. service