Login centos6.5, input ifconfig can view the current IP address of the machine, 650) this.width=650; "Src=" http://s3.51cto.com/wyfs02/M00/6B/66/wKioL1Us0_ Rjbxbraajs6yz-z6s656.jpg "title=" qq picture 20150414163943.png "alt=" Wkiol1us0_rjbxbraajs6yz-z6s656.jpg "/>
When you want to temporarily set the IP address: such as this machine for example, the above query IP is 3.164, enter ifconfig eth0 (default is the first network card) after the IP address, netmask and gateway, if not set, use the default mask 650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M01/6B/6B/wKiom1Us08fy3sLpAAApbOuZw2E307.jpg "title=" qq picture 20150414164443.png "alt=" Wkiom1us08fy3slpaaapbouzw2e307.jpg "/>
See IP address again: 650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/6B/67/wKioL1Us1WiSdH-gAAJISafPdaI776.jpg "title = "QQ picture 20150414164603.png" alt= "Wkiol1us1wisdh-gaajisafpdai776.jpg"/>
Note: The IP address is restored after the restart.
If you want to make the IP address permanent, you need to edit the network card configuration file using the VI editor settings, such as vi/etc/sysconfig/network-scripts/ifcfg-eth0 650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M02/6B/6B/wKiom1Us1T7ypKAbAAECv7Pcw5U269.jpg "title=" qq picture 20150414165055.png "alt=" Wkiom1us1t7ypkabaaecv7pcw5u269.jpg "/>
Where: ipaddr for the IP address (Bootproto only when the property is static and IP address), Gateway for the network management, netmask subnet mask, modified: Wq save exit is good.
Once setup is complete, remember to restart the network with the Service Network Restart command, or use/etc/init.d/network restart
This will enable you to view the IP address you have modified.
This article comes from the "Can't Not be" blog, be sure to keep this source http://lvlvlv.blog.51cto.com/10119280/1632358
centos6.5 Modifying IP addresses