Run centos on vmware and set Nic Information

Source: Internet
Author: User

Run centos on vmware and set Nic Information

1. Set the NIC of the vmware Virtual Machine to host-only,


2. view the "Network Connection" currently used by the local machine, properties, select the "advanced" label, set to allow sharing, and set the allowed network interface to vmnet1.
3. let's take a look at your VMnet1 attributes and take a look at the TCP/IP Settings. You can see that it has been automatically set to 192.168.137.1 (this IP address may be different from your own, but remember that this IP address is used as the linux gateway in the Virtual Machine)/255.255.255.0
4. Then in the Virtual Machine linux settings, first is vi/etc/sysconfig/network-scripts/ifcfg-eth0
Note: This file can be displayed by vmware. When you execute the ll command, it cannot be displayed. I directly execute the command.
Settings reference

Modify or add ONBOOT \ BOOTPROTO \ IPADDR \ NETMASK \ GETEWAY.
For the meaning of each field, go to Baidu
5. Configure dns resolution
Echo "nameserver 211.98.1.28 (this IP address is the DNS server address)">/etc/resolv. conf
6. If you have not set the Host Name:
Cd/etc/sysconfig
Vi network
Edit HOSTNAME
Cd/etc
Vi hosts
Join:
192.168.0.2 yourhostname

7. Restart the service
Su
/Sbin/service network restart
8. Check if OK is set.
Ping www.baidu.com

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.