{"id":2867,"date":"2016-06-06T19:25:34","date_gmt":"2016-06-06T10:25:34","guid":{"rendered":"http:\/\/oohito.com\/nqthm\/?p=2867"},"modified":"2016-06-06T19:25:34","modified_gmt":"2016-06-06T10:25:34","slug":"raspberry-pi-a%e3%81%abraspbian%e3%82%92%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab%e3%81%99%e3%82%8b","status":"publish","type":"post","link":"https:\/\/oohito.com\/nqthm\/archives\/2867","title":{"rendered":"Raspberry Pi A+\u306bRaspbian\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b"},"content":{"rendered":"<p>\u5b8c\u5168\u306a\u5099\u5fd8\u9332\u3002\u6765\u305f\u9053\u3092\u898b\u5931\u308f\u306a\u3044\u305f\u3081\u306b\u3002<\/p>\n<h2>\u76ee\u6a19<\/h2>\n<ul>\n<li>\u30b3\u30f3\u30bd\u30fc\u30eb\u3067\u8d77\u52d5\uff08GUI\u306f\u4f7f\u308f\u306a\u3044\uff09<\/li>\n<li>wifi\u3067\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u63a5\u7d9a<\/li>\n<li>Python\u3067GPIO\u3092\u4f7f\u3046\uff08<a href=\"http:\/\/oohito.com\/nqthm\/archives\/2870\">\u5225\u8a18\u4e8b<\/a>\uff09<\/li>\n<\/ul>\n<h2>\u6e96\u5099<\/h2>\n<ul>\n<li>Raspberry Pi A+<\/li>\n<li>MicroSD\u30ab\u30fc\u30c9(8MB\u4ee5\u4e0a\u306e\u3082\u306e\uff09<\/li>\n<li>WiFi USB Adapter(GW-USNano2)<\/li>\n<li>\u305d\u306e\u4ed6\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\u5fc5\u8981\u306a\u3082\u308d\u3082\u308d\n<ul>\n<li>\u30bb\u30eb\u30d5\u30d1\u30ef\u30fc\u306eUSB\u30cf\u30d6<\/li>\n<li>\u30ad\u30fc\u30dc\u30fc\u30c9<\/li>\n<li>\u30de\u30a6\u30b9<\/li>\n<li>HDMI\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4<\/li>\n<li>USB-LAN\u30a2\u30c0\u30d7\u30bf<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2>Raspbian\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n<p><a href=\"https:\/\/www.raspberrypi.org\/downloads\/\">Raspberry Pi\u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\u306eDownload\u30da\u30fc\u30b8<\/a>\u3067NOOBS\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u3002<br \/>\n\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305f\u5727\u7e2e\u30d5\u30a1\u30a4\u30eb\u3092\u5c55\u958b\u3057\u3001\u305d\u306e\u4e2d\u8eab\u3092\u5168\u3066FAT\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3057\u305fMicroSD\u30ab\u30fc\u30c9\u306b\u30b3\u30d4\u30fc\u3059\u308b\u3002<br \/>\n\u30b3\u30d4\u30fc\u3057\u305fMicroSD\u30ab\u30fc\u30c9\u3092\u3001\u3082\u308d\u3082\u308d\u63a5\u7d9a\u3057\u305fRaspberry Pi A+\u306b\u633f\u5165\u3057\u3066\u8d77\u52d5\u3059\u308b\u3002<br \/>\n\u8d77\u52d5\u3057\u305f\u3089Raspbian\u3092\u9078\u629e\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u9032\u3081\u308b\u3002<\/p>\n<h2>\u57fa\u672c\u8a2d\u5b9a\uff08\u305d\u306e\uff11\uff09<\/h2>\n<p>Raspbian \u304c\u8d77\u52d5\u3057\u305f\u3089\u30b3\u30f3\u30bd\u30fc\u30eb\u3092\u958b\u3044\u3066\u3001raspi-config \u3092\u5b9f\u884c\u3059\u308b\u3002<\/p>\n<pre>sudo raspi-config<\/pre>\n<p>Advanced Options\u3067\u3001A2 Hostname \u3092\u9078\u3076\u3002\u7d9a\u304f\u753b\u9762\u3067\u3001Hostname \u3068\u3057\u3066\u9069\u5f53\u306a\u540d\u524d\u3092\u5165\u529b\u3059\u308b\u3002\uff08\u3053\u3053\u3067\u306f\u4f8b\u3068\u3057\u3066\u3001rover\u3092\u5165\u529b\u3057\u305f\u3082\u306e\u3068\u3059\u308b\uff09<br \/>\nAdvanced Options\u3067\u3001A4 SSH\u3092\u9078\u3076\u3002\u7d9a\u304f\u753b\u9762\u3067\u3001Enable\u3092\u9078\u3076\u3002<br \/>\nEnable Boot to Desktop\/Scratch\u3067\u3001B2 Console Autologin \u3092\u9078\u3076\u3002<br \/>\nFinish\u3092\u9078\u3093\u3067\u518d\u8d77\u52d5\u3059\u308b\u3002<\/p>\n<h2>\u57fa\u672c\u8a2d\u5b9a\uff08\u305d\u306e\uff12\uff09<\/h2>\n<p>\u5225\u306ePC\u304b\u3089\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u7d4c\u7531\u3067\u8a2d\u5b9a\u3092\u7d99\u7d9a\u3059\u308b\u3002<br \/>\n\u307e\u305a\u3001PING\u304c\u901a\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3059\u308b\u3002<\/p>\n<pre>ping rover.local<\/pre>\n<p>SSH\u3067\u30ed\u30b0\u30a4\u30f3\u3057\u3001.ssh \u30d5\u30a9\u30eb\u30c0\u3092\u4f5c\u6210\u3059\u308b\u3002\u30d1\u30b9\u30ef\u30fc\u30c9\u306b\u306fraspberry\u3092\u5165\u529b\u3059\u308b\u3002<\/p>\n<pre>ssh pi@rover.local\nmkdir .ssh<\/pre>\n<p>sshd_config\u306e\u8a2d\u5b9a\u3092\u5909\u66f4\u3059\u308b\u3002<\/p>\n<pre>sudo vi \/etc\/ssh\/sshd_config<\/pre>\n<p>\u6700\u7d42\u884c\u306eUsePAM\u3092yes\u304b\u3089no\u306b\u5909\u66f4\u3057\u3001\u3055\u3089\u306bUseDNS no\u3092\u8ffd\u52a0\u3059\u308b\u3002\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308c\u3070\u3088\u3044\u3002<\/p>\n<pre>UsePAM no\nUseDNS no<\/pre>\n<p>\u3044\u3063\u305f\u3093\u30ed\u30b0\u30a2\u30a6\u30c8\u3057\u3066\u304b\u3089\u3001SSH\u9375\u3092\u8ee2\u9001\u3059\u308b\u3002<\/p>\n<pre>scp .ssh\/id_rsa.pub pi@rover.local:~\/.ssh\/authorized_keys<\/pre>\n<p>\u518d\u5ea6\u3001ssh\u3067\u30ed\u30b0\u30a4\u30f3\u3059\u308b\u3002\u4ee5\u964d\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u5165\u529b\u3092\u6c42\u3081\u3089\u308c\u306a\u3044\u3002<\/p>\n<pre>ssh pi@rover.local<\/pre>\n<p>\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u66f4\u65b0\u3057\u3001\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3059\u308b\u3002<\/p>\n<pre>sudo apt-get update\nsudo apt-get upgrade<\/pre>\n<p>raspi-config \u3092\u8d77\u52d5\u3057\u3066\u8a2d\u5b9a\u306e\u7d9a\u304d\u3092\u884c\u3046\u3002<\/p>\n<pre>sudo raspi-config<\/pre>\n<p>Internationalisation Options\u3067\u3001I1 Change Locale \u3092\u9078\u3076\u3002<br \/>\nen_GB.UTF-8 \u306e\u9078\u629e\u3092\u5916\u3057\u3001en_US.UTF-8 \u3068 ja_JP.UTF-8 \u3092\u9078\u629e\u3059\u308b\u3002<br \/>\nInternationalisation Options\u3067\u3001I2 Change Timezone \u3092\u9078\u3076\u3002<br \/>\n\u30a2\u30b8\u30a2(Asia), Tokyo\u3092\u9078\u3076\u3002<br \/>\nInternationalisation Options\u3067\u3001I3 Change Keyboard Layout \u3092\u9078\u3076\u3002<br \/>\n\u30ad\u30fc\u30dc\u30fc\u30c9\u306b\u5408\u308f\u305b\u3066\u9069\u5207\u306a\u3082\u306e\u3092\u9078\u3076\u3002<\/p>\n<h2>wifi\u8a2d\u5b9a<\/h2>\n<p>\/etc\/network\/interfaces \u3092\u7de8\u96c6\u3059\u308b\u3002<\/p>\n<pre>iface wlan0 inet manual<\/pre>\n<p>\u3053\u308c\u3092<\/p>\n<pre>iface wlan0 inet dhcp<\/pre>\n<p>\u306b\u66f8\u304d\u63db\u3048\u308b\u3002<br \/>\n\/etc\/wpa_supplicant\/wpa_supplicant.conf \u3092\u4f5c\u6210\u3059\u308b\u3002\u306a\u304a\u3001ESSID\u3001PSK\u306b\u306f\u9069\u5207\u306a\u3082\u306e\u3092\u6307\u5b9a\u3059\u308b\u3002<\/p>\n<pre>sudo bash\ncd \/etc\/wpa_supplicant\nwpa_passphrase ESSID PSK >> wpa_supplicant.conf<\/pre>\n<p>wifi\u30e2\u30b8\u30e5\u30fc\u30eb\u3092USB\u30cf\u30d6\u306b\u633f\u5165\u3059\u308b\u304b\u3001\u633f\u5165\u6e08\u3067\u3042\u308c\u3070\u4ee5\u4e0b\u3092\u5b9f\u884c\u3057\u3066 wifi \u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u518d\u8a2d\u5b9a\u3059\u308b\u3002<\/p>\n<pre>ifdown wlan0\nifup wlan0<\/pre>\n<p>\u30ed\u30b0\u30a2\u30a6\u30c8\u3057\u305f\u5f8c\u3001\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30b1\u30fc\u30d6\u30eb\u3092\u5916\u3057\u3066\u3082PC\u304b\u3089PING\u304c\u901a\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3059\u308b\u3002<br \/>\n\u4ee5\u4e0a\u3067\u57fa\u672c\u7684\u306a\u8a2d\u5b9a\u306f\u5b8c\u4e86\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5b8c\u5168\u306a\u5099\u5fd8\u9332\u3002\u6765\u305f\u9053\u3092\u898b\u5931\u308f\u306a\u3044\u305f\u3081\u306b\u3002 \u76ee\u6a19 \u30b3\u30f3\u30bd\u30fc\u30eb\u3067\u8d77\u52d5\uff08GUI\u306f\u4f7f\u308f\u306a\u3044\uff09 wifi\u3067\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u63a5\u7d9a Python\u3067GPIO\u3092\u4f7f\u3046\uff08\u5225\u8a18\u4e8b\uff09 \u6e96\u5099 Raspberry Pi A+ MicroSD\u30ab\u30fc\u30c9(8MB&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[],"class_list":["post-2867","post","type-post","status-publish","format-standard","hentry","category-raspberry-pi"],"_links":{"self":[{"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/posts\/2867","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/comments?post=2867"}],"version-history":[{"count":0,"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/posts\/2867\/revisions"}],"wp:attachment":[{"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/media?parent=2867"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/categories?post=2867"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/tags?post=2867"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}