{"id":19102,"date":"2015-12-29T17:35:27","date_gmt":"2015-12-29T09:35:27","guid":{"rendered":"https:\/\/2blog.ilc.edu.tw\/25793\/2015\/12\/29\/%e8%a7%a3%e6%b1%ba-raspberry-pi-raspbian-jessie-lite-%e5%a4%9a%e4%b8%80%e5%80%8b-ip-%e7%9a%84%e5%95%8f%e9%a1%8c\/"},"modified":"2015-12-29T17:35:27","modified_gmt":"2015-12-29T09:35:27","slug":"%e8%a7%a3%e6%b1%ba-raspberry-pi-raspbian-jessie-lite-%e5%a4%9a%e4%b8%80%e5%80%8b-ip-%e7%9a%84%e5%95%8f%e9%a1%8c","status":"publish","type":"post","link":"https:\/\/2blog.ilc.edu.tw\/25793\/2015\/12\/29\/%e8%a7%a3%e6%b1%ba-raspberry-pi-raspbian-jessie-lite-%e5%a4%9a%e4%b8%80%e5%80%8b-ip-%e7%9a%84%e5%95%8f%e9%a1%8c\/","title":{"rendered":"\u89e3\u6c7a Raspberry Pi Raspbian Jessie Lite \u591a\u4e00\u500b IP \u7684\u554f\u984c"},"content":{"rendered":"<p>\u4f7f\u7528 Raspberry Pi Raspbian Jessie Lite \u67b6\u8a2d\u4e00\u500b\u7db2\u8def\u76e3\u63a7\u7cfb\u7d71\uff0c\u4f46\u5f88\u5947\u602a\u7684\u662f\u8a2d\u5b9a\u597d\u56fa\u5b9a IP \u5f8c\uff0c\u7cfb\u7d71\u597d\u50cf\u6703\u81ea\u52d5\u51fa\u591a\u4e00\u500b IP\u3002<br \/>\u4f7f\u7528 <span style=\"color: #ff0000;\">ip<\/span> \u6307\u4ee4\u53ef\u4ee5\u67e5\u8a62\u5230 2 \u500b IP<br \/># <span style=\"color: #ff0000;\">ip addr show eth0 | grep &#8216;inet&#8217; | grep -v &#8216;inet6&#8217; | awk &#8216;{print $2}&#8217;<\/span><br \/><span style=\"color: #0000ff;\">192.168.1.74\/24<\/span><br \/><span style=\"color: #0000ff;\">192.168.1.82\/24<\/span><\/p>\n<p>\u4f7f\u7528 <span style=\"color: #ff0000;\">ifconfig<\/span> \u6307\u4ee4\u53ea\u80fd\u67e5\u8a62\u4e00\u500b IP<br \/># <span style=\"color: #ff0000;\">ifconfig eth0 | grep &#8216;inet addr&#8217; | awk &#8216;{print $2}&#8217; | awk -F&#8217;:&#8217; &#8216;{print $2}&#8217;<\/span><br \/><span style=\"color: #0000ff;\">192.168.1.74<\/span>[@more@]\u53ef\u662f\u5728 <span style=\"color: #0000ff;\">\/etc\/network\/interfaces<\/span> \u53ea\u8a2d\u5b9a\u4e86\u4e00\u500b IP<br \/># <span style=\"color: #ff0000;\">cat \/etc\/network\/interfaces<\/span><br \/><span style=\"color: #0000ff;\">iface eth0 inet static<\/span><br \/><span style=\"color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 address 192.168.1.74<\/span><br \/><span style=\"color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 netmask 255.255.255.0<\/span><br \/><span style=\"color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 gateway 192.168.1.254<\/span><br \/><span style=\"color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 dns-nameservers 168.95.1.1<\/span><\/p>\n<p>\u89e3\u6c7a\u65b9\u5f0f\uff1a<br \/>1. \u95dc\u9589 dhcpcd \u670d\u52d9<br \/># <span style=\"color: #ff0000;\">systemctl stop dhcpcd.service<\/span><\/p>\n<p>2. \u53d6\u6d88\u958b\u6a5f\u6642\u555f\u52d5 dhcpcd \u670d\u52d9<br \/># <span style=\"color: #ff0000;\">systemctl disable dhcpcd.service<\/span><br \/><span style=\"color: #0000ff;\">Synchronizing state for dhcpcd.service with sysvinit using update-rc.d&#8230;<\/span><br \/><span style=\"color: #0000ff;\">Executing \/usr\/sbin\/update-rc.d dhcpcd defaults<\/span><br \/><span style=\"color: #0000ff;\">insserv: warning: current start runlevel(s) (empty) of script `dhcpcd&#8217; overrides LSB defaults (2 3 4 5).<\/span><br \/><span style=\"color: #0000ff;\">insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `dhcpcd&#8217; overrides LSB defaults (0 1 6).<\/span><\/p>\n<p><span style=\"color: #0000ff;\">Executing \/usr\/sbin\/update-rc.d dhcpcd disable<\/span><br \/><span style=\"color: #0000ff;\">insserv: warning: current start runlevel(s) (empty) of script `dhcpcd&#8217; overrides LSB defaults (2 3 4 5).<\/span><br \/><span style=\"color: #0000ff;\">insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `dhcpcd&#8217; overrides LSB defaults (0 1 6).<\/span><\/p>\n<p>3. \u91cd\u65b0\u555f\u555f\u52d5\u96fb\u8166<br \/># <span style=\"color: #ff0000;\">sysnc;sync;reboot<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4f7f\u7528 Raspberry Pi Raspbian Jessie Lite \u67b6\u8a2d\u4e00\u500b\u7db2\u8def\u76e3\u63a7\u7cfb\u7d71\uff0c\u4f46\u5f88\u5947\u602a\u7684\u662f\u8a2d &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/2blog.ilc.edu.tw\/25793\/2015\/12\/29\/%e8%a7%a3%e6%b1%ba-raspberry-pi-raspbian-jessie-lite-%e5%a4%9a%e4%b8%80%e5%80%8b-ip-%e7%9a%84%e5%95%8f%e9%a1%8c\/\" class=\"more-link\">\u95b1\u8b80\u5168\u6587<span class=\"screen-reader-text\">\u3008\u89e3\u6c7a Raspberry Pi Raspbian Jessie Lite \u591a\u4e00\u500b IP \u7684\u554f\u984c\u3009<\/span><\/a><\/p>\n","protected":false},"author":55,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[179,114],"tags":[],"class_list":["post-19102","post","type-post","status-publish","format-standard","hentry","category-c-87877","category-c-77340"],"meta_key":{"_pingme":["1"],"_encloseme":["1"],"lt_post_id":["621949"]},"_links":{"self":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts\/19102"}],"collection":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/users\/55"}],"replies":[{"embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/comments?post=19102"}],"version-history":[{"count":0,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts\/19102\/revisions"}],"wp:attachment":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/media?parent=19102"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/categories?post=19102"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/tags?post=19102"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}