centos7ÔõôÉèÖÃip
centos 7 ÖÐÉèÖà ip µØµãµÄÒªÁ죺1. ±à¼ÍøÂçÉèÖÃÎļþ£»2. ÉèÖà ip µØµãºÍÍøÂçÑÚÂ룻3. ÉèÖÃÍø¹Ø£¨¿ÉÑ¡£©£»4. ÆôÓÃÍøÂçЧÀÍ£»5. ÑéÖ¤ ip µØµã¡£
CentOS 7 ÖÐÔõÑùÉèÖà IP µØµã
ÒªÉèÖà CentOS 7 ÖÐµÄ IP µØµã£¬ÇëÖ´ÐÐÒÔÏ°취£º
1. ±à¼ÍøÂçÉèÖÃÎļþ
vi /etc/sysconfig/network-scripts/ifcfg-eth0
µÇ¼ºó¸´ÖÆ
2. ÉèÖà IP µØµãºÍÍøÂçÑÚÂë
IPADDR=192.168.0.20 NETMASK=255.255.255.0
µÇ¼ºó¸´ÖÆ
3. ÉèÖÃÍø¹Ø (¿ÉÑ¡)
ÈôÊÇÄúÐèҪͨ¹ýÍø¹Ø»á¼ûÆäËûÍøÂ磬ÇëÉèÖÃÍø¹Ø£º
GATEWAY=192.168.0.1
µÇ¼ºó¸´ÖÆ
4. ÆôÓÃÍøÂçЧÀÍ
systemctl start network
µÇ¼ºó¸´ÖÆ
5. ÑéÖ¤ IP µØµã
ÒªÑéÖ¤ IP µØµãÊÇ·ñÒÑ׼ȷÉèÖã¬ÇëÔËÐÐÒÔÏÂÏÂÁ
ifconfig eth0
µÇ¼ºó¸´ÖÆ
ÄúÓ¦¸Ã»á¿´µ½ÈçÏÂÊä³ö£º
eth0: flags=4163<up> mtu 1500 inet 192.168.0.20 netmask 255.255.255.0 broadcast 192.168.0.255 inet6 fe80::20c:29ff:fe4f:f2b2 prefixlen 64 scopeid 0x20<link> ether 00:0c:29:4f:f2:b2 txqueuelen 1000 (Ethernet) RX packets 321 bytes 31134 (30.2 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 292 bytes 31329 (30.5 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0</up>
µÇ¼ºó¸´ÖÆ
ÆäÖÐ inet 192.168.0.20 ÌåÏÖÒÑ·ÖÅÉµÄ IP µØµã¡£
ÒÔÉϾÍÊÇcentos7ÔõôÉèÖÃipµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡
ÃâÔð˵Ã÷£ºÒÔÉÏչʾÄÚÈÝȪԴÓÚÏàÖúýÌå¡¢ÆóÒµ»ú¹¹¡¢ÍøÓÑÌṩ»òÍøÂçÍøÂçÕûÀí£¬°æȨÕùÒéÓë±¾Õ¾Î޹أ¬ÎÄÕÂÉæ¼°¿´·¨Óë¿´·¨²»´ú±í尊龙凯时人生就是博ÂËÓÍ»úÍø¹Ù·½Ì¬¶È£¬Çë¶ÁÕß½ö×ö²Î¿¼¡£±¾ÎĽӴýתÔØ£¬×ªÔØÇë˵Ã÷À´ÓÉ¡£ÈôÄúÒÔΪ±¾ÎÄÇÖÕ¼ÁËÄúµÄ°æȨÐÅÏ¢£¬»òÄú·¢Ã÷¸ÃÄÚÈÝÓÐÈκÎÉæ¼°ÓÐÎ¥¹«µÂ¡¢Ã°·¸Ö´·¨µÈÎ¥·¨ÐÅÏ¢£¬ÇëÄúÁ¬Ã¦ÁªÏµ尊龙凯时人生就是博ʵʱÐÞÕý»òɾ³ý¡£