CentOS7 configuration log (VirtualBox)

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.