centos7ÉèÖÃipµØµãÔõôÉúÑÄ
¿ÉÒÔͨ¹ýÒÔÏ°취ÉúÑÄ centos 7 ÖÐµÄ ip µØµãÉèÖ㺱à¼ÍøÂçÉèÖÃÎļþ /etc/sysconfig/network-scripts/ifcfg-eth0£¬ÆäÖÐ eth0 ÊÇÍøÂç½Ó¿ÚµÄÃû³Æ¡£ÐÞ¸Ä ip µØµã¡¢×ÓÍøÑÚÂëºÍĬÈÏÍø¹ØµÈÉèÖá£ÉúÑÄÉèÖÃÎļþ¡£ÔËÐÐÏÂÁî systemctl restart network ÖØÆôÍøÂçЧÀÍ¡£
ÔõÑùÉúÑÄ CentOS 7 ÖÐµÄ IP µØµãÉèÖã¿
ÔÚ CentOS 7 ÖУ¬¿ÉÒÔͨ¹ý±à¼ÍøÂçÉèÖÃÎļþ²¢ÖØÆôÍøÂçЧÀÍÀ´ÉúÑÄ IP µØµãÉèÖá£
Ïêϸ°ì·¨£º
±à¼ÍøÂçÉèÖÃÎļþ£º
ʹÓÃÎı¾±à¼Æ÷£¨Èç nano »ò vim£©·¿ªÍøÂçÉèÖÃÎļþ /etc/sysconfig/network-scripts/ifcfg-eth0¡£ÆäÖÐ eth0 ÊÇÍøÂç½Ó¿ÚµÄÃû³Æ£¬Çëƾ֤ÐèÒª¾ÙÐе÷½â¡£
¶¨Î»µ½ÒÔÏÂÐв¢¾ÙÐÐÐ޸ģº
IPADDR=192.168.1.10£¨½«´ËÌ滻ΪËùÐèµÄ IP µØµã£©
NETMASK=255.255.255.0£¨½«´ËÌ滻ΪËùÐèµÄ×ÓÍøÑÚÂ룩
GATEWAY=192.168.1.1£¨½«´ËÌ滻ΪĬÈÏÍø¹ØµÄ IP µØµã£¬ÈôÊÇÐèÒª£©
ÉúÑÄÉèÖÃÎļþ£º
°´ Ctrl + O ÉúÑĸü¸Ä²¢°´ Enter Í˳ö¡£
ÖØÆôÍøÂçЧÀÍ£º
ÔËÐÐÒÔÏÂÏÂÁîÖØÆôÍøÂçЧÀÍ£º
systemctl restart network
ÏÖÔÚ£¬IP µØµãÉèÖÃÒÑÓÀÊÀÉúÑÄ¡£Ï´ÎÆô¶¯ÅÌËã»úʱ£¬Ëü½«Ê¹ÓøüкóµÄÉèÖá£
ÒÔÉϾÍÊÇcentos7ÉèÖÃipµØµãÔõôÉúÑĵÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡