Top / Raspberry Pi / インストール

やってみる

Raspbian OSのダウンロード

Download Raspbian for Raspberry Pi よりダウンロードします。2018/03/21現在:

http://director.downloads.raspberrypi.org/raspbian/images/raspbian-2018-03-14/2018-03-13-raspbian-stretch.zip が最新版のようです。

ダウンロードと解凍

$ curl http://director.downloads.raspberrypi.org/raspbian/images/raspbian-2018-03-14/2018-03-13-raspbian-stretch.zip -O
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 1693M  100 1693M    0     0  2476k      0  0:11:40  0:11:40 --:--:-- 3093k
$ ls -lrt 2018-03-13-raspbian-stretch.zip
-rw-r--r--  1 masatomix  staff  1776280071  3 21 17:58 2018-03-13-raspbian-stretch.zip
$ unzip 2018-03-13-raspbian-stretch.zip
Archive:  2018-03-13-raspbian-stretch.zip
  inflating: 2018-03-13-raspbian-stretch.img
$ ls -lrt 2018-03-13-raspbian-stretch.img
-rw-r--r--  1 masatomix  staff  4949278720  3 14 08:17 2018-03-13-raspbian-stretch.img

前準備は以上です。

SDカードへのコピー

Installing operating system images on Mac OS - Raspberry Pi Documentation を参考に、MicroSDカードへOSイメージをコピーします。Macなら下記の通りでOKです。

$ diskutil list
/dev/disk4 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *62.9 GB    disk4
   1:                 DOS_FAT_32 disk                    62.9 GB    disk4s1
$ diskutil unmountDisk /dev/disk4
Unmount of all volumes on disk4 was successful
$ sudo dd bs=1m if=2018-03-13-raspbian-stretch.img of=/dev/rdisk4 conv=sync
Password:
4720+0 records in
4720+0 records out
4949278720 bytes transferred in 335.308527 secs (14760372 bytes/sec)
$ diskutil list
/dev/disk4 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *62.9 GB    disk4
   1:             Windows_FAT_32 boot                    43.8 MB    disk4s1
   2:                      Linux                         4.9 GB     disk4s2

コピー完了です。

ラズパイの起動。

ラズパイ先のMicroSDを差し込んでブート。

SSHの起動までは、GUIで操作する必要があるので、キーボードやマウス、HDMIのモニタなどを繋いで、あと有線LANなどを繋いで*1、ラズパイ上のターミナルで

# sudo raspi-config

ってConfigurationのアプリを起動します。 「5 Interfacing Options Configure connections to peripherals」を選択して「P2 SSH Enable/Disable remote command line access to your Pi using SSH」を選択。 さいごにYes を選ぶとSSHが起動します。

この先はSSHで繋げばよいので、ラズパイは電源だけ繋いでおけばOKですね。

ついでに最新化

# sudo apt update
# sudo apt upgrade

vncサーバの起動

# sudo raspi-config

「5 Interfacing Options Configure connections to peripherals」を選択して「P3 VNC Enable/Disable graphical remote access to your Pi using RealVNC」を選択。 さいごにYes を選ぶとSSHが起動します。

Locale

# sudo raspi-config

「4 Localisation Options Set up language and regional settings to match your location」> 「I1 Change Locale Set up language and regional settings to match your location」> [*] ja_JP.UTF-8 UTF-8

Time Zone

VNC上の Preferences > Raspberry Pi Configuration > Localisation > Set Timezone... で、Asia/Tokyoを選択。

関連リンク


この記事は

選択肢 投票
おもしろかった 0  
そうでもない 0  

Top / Raspberry Pi / インストール

現在のアクセス:1348


*1 無線でもいいんすけどSSIDとかメンドクサイですよね

トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2018-03-21 (水) 20:51:17 (2227d)