1, Command: ifconfig (if there is no IP addr=***** option) indicates that no IP address is configured
2, at the command prompt, edit the VI space/etc/sysconfig/network-scripts/ifcfg-eth0 after it appears as:
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/73/5C/wKiom1X7cFOiCBydAAFOwgJPm8o055.jpg "title=" Qq20150918095829.png "alt=" Wkiom1x7cfoicbydaafowgjpm8o055.jpg "/>
See IPADDR, put this one behind the IP into the last line mode, press wq! to save.
The second method:
Enter setup into graphics mode at the command prompt
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/73/5C/wKiom1X7cr6R3wovAAGQKTOGK2w253.jpg "style=" float: none; "title=" 123.png "alt=" Wkiom1x7cr6r3wovaagqktogk2w253.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/73/5A/wKioL1X7dPfz86JJAAEW_lVa1LE100.jpg "style=" float: none; "title=" 124.png "alt=" Wkiol1x7dpfz86jjaaew_lva1le100.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/73/5D/wKiom1X7cr6RlVUMAAFF9moKFwo802.jpg "style=" float: none; "title=" 125.png "alt=" Wkiom1x7cr6rlvumaaff9mokfwo802.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/73/5A/wKioL1X7dPeQpEggAAGy04J4ynM916.jpg "style=" float: none; "title=" 126.png "alt=" Wkiol1x7dpeqpeggaagy04j4ynm916.jpg "/>
Always enter, modify and then use the TAB key to switch to the OK key to enter, Save&quik. It's okay.
Note: netmask=255.255.255.0 is a subnet mask
Gateway= is the default gateway
The CentOS command sets the network IP method