How to automatically set the IP address of CentOS in OracleVMVirtual

Source: Internet
Author: User
Tags oracle vm virtualbox vm virtualbox
In OracleVMVirtual, CentOS automatically obtains the IP address settings. for details, refer to use CentOS to configure enable the NIC to automatically obtain the IP address at CentOS startup:

Vi/etc/sysconfig/network-scripts/ifcfg-eth0

Change ONBOOT = "no" to ONBOOT = "yes"

After saving: service network restart

View IP: ifconfig eth0

Then, the port forwarding function (port forwarding) of the Oracle VM VirtualBox is used to implement communication between the host and the client through the virtual Nic of the virtual machine.

Open virtualboxSetWindow>Network->Nic1. enable network connection-> connection method: NAT-> access network cable->Port Forwarding, Set as follows

Configure the ing between the virtual nic ip address and the client IP address: Port 22. in the figure, the host port of the client is set to 2200. then, the system on the VM can be connected through the putty client tool, Note that Port is set to 2200
Related Article

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.