Instance Environment
# ifconfig-a << View the status of all network cards
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/59/EB/wKiom1TvEk_Qib9XAAGzcBkQsHU513.jpg "title=" Ifconfig.jpg "alt=" Wkiom1tvek_qib9xaagzcbkqshu513.jpg "/>
2. # vi/etc/sysconfig/network-scripts/ifcfg-eth0 << Edit NIC configuration file
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/59/EC/wKiom1TvFBKjI6ZIAADk63qAeHQ147.jpg "title=" Ifcfg-eth0.jpg "alt=" Wkiom1tvfbkji6ziaadk63qaehq147.jpg "/>
Press the I key to start the configuration
What to modify :
Identification 5 Onboot=no modified to Onboot=yes
# is booting with the system
Identification 7 BOOTPROTO=DHCP modified to Bootproto=static
# IP Address allocation method, whether the DHCP server is automatically assigned or manually configured
What to add :
ipaddr=192.168.1.108 << IP
netmask=255.255.255.0 << Subnet Masks
gateway=192.168.1.1 << Gateways
dns1=202.96.128.166
dns2=202.96.134.133
DNS configuration is added according to local network provider
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/59/E9/wKioL1TvL2rzV-GoAAEBUmfOMOU771.jpg "title=" Dns.jpg "alt=" Wkiol1tvl2rzv-goaaebumfomou771.jpg "/>
3. Exit Save:
① Press the ESC key
② Input: Wq return
4. Restart Network Service: # Service Network restart
650) this.width=650; "style=" width:700px;height:128px; "src=" http://s3.51cto.com/wyfs02/M01/59/EC/ Wkiom1tvgz6xnynjaaejol7ffbc165.jpg "title=" network.jpg "alt=" wkiom1tvgz6xnynjaaejol7ffbc165.jpg "border=" 0 "Height = "hspace=" 0 "vspace=" 0 "width="/>
DNS can also be configured in other files
# vi/etc/resolv.conf
Join
NameServer 202.96.128.166
NameServer 202.96.134.133
Exit Save and restart the network service. The actual/etc/resolv.conf is automatically called before the NIC configuration file DNS configuration information
This article is from the "Mylinux" blog, make sure to keep this source http://mylinuxlife.blog.51cto.com/4706737/1615542
Network IP configuration for CentOS 6.6 New Installation system