Vmware configures a CentOS virtual machine to access the Internet

Source: Internet
Author: User
1. network Connection mode: Select NAT2. edit the DNS configuration file/etc/resolv of the VM. conf set nameserver to the NAT gateway address in the VM [root@andes.com/etc] # catresolv. conf # Nonameserversfoun

1. network connection mode:

Select NAT


2. edit the DNS configuration file/etc/resolv. conf of the VM.

Set nameserver to the NAT gateway address in the VM.

[root@andes.com /etc]#cat resolv.conf  # No nameservers found; try putting DNS servers into your  # ifcfg files in /etc/sysconfig/network-scripts like so:  #  # DNS1=xxx.xxx.xxx.xxx  # DNS2=xxx.xxx.xxx.xxx  # DOMAIN=lab.foo.com bar.foo.com  nameserver 192.168.59.2  

3. edit the Nic configuration file:


/Etc/sysconfig/network-scripts/ifcfg-eth0, the focus is to set the IP address, set the IP address to the static mode, set the gateway, and then SecureCRT terminal login do not need to change the IP address frequently.

[root@andes.com /etc/sysconfig/network-scripts]#cat ifcfg-eth0  DEVICE="eth0"  HWADDR="00:0C:29:27:F4:A8"  NM_CONTROLLED="yes"  ONBOOT="yes"  IPADDR="192.168.59.133"  GATEWAY=192.168.59.2  BOOTPROTO=static  


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.