Install CENTOS7 network configuration under VirtualBox

Source: Internet
Author: User

Install the virtual machine in accordance with VirtualBox Standard mode
To ensure that the virtual machine is connected properly and that the virtual machine is locally accessible outside the virtual machine, you need to configure two network cards
The first one is set to NAT, the second is set to Host-only
And then:
Under the/etc/sysconfig/network-scripts/directory, modify the Ifcfg-eth0 NIC configuration:
Change onboot= "No" to Yes, add bootproto= "DHCP", save, exit, restart
Ping www.baidu.com available;
Ping 192.168.56.* available;
Look at IP addr, found that the virtual machine IP is dynamically configured, so that the wrong, the local cannot easily access the virtual machine, also indicates that the connection Xshell is troublesome, so to change the local IP to static, so modify the IFCFG-ETH1 network adapter configuration:
Bootproto=static #获取IP的方式是dhcp或bootp自动获取, Static is fixed Ip,none is manual
ipaddr=192.168.56.2
netmask=255.255.255.0
Reboot, Perfect ~

Install CENTOS7 network configuration under VirtualBox

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.