機材準備
OSインストール
ユーザー設定
SSH設定
OSインストール
ユーザー設定
SSH設定
前回まででおおよその設定は終わりました。
ラズパイからキーボードもマウスもモニタも外して構いませんし、リモートから触って遊べます。
ここからはその他の便利な設定について説明します(必須ではありません)。
apt-getのミラーサーバを変更する
apt-get で接続するサーバを変更します。
デフォルトは mirrordirector.raspbian.org になっていて、接続元のIP(かな?)をもとに適切なサーバに割り振ってくれるようですが、最初から近場のサーバからダウンロードしたほうが効率的なので、これを変更します。
デフォルトの確認
念のためデフォルトのサーバを確認しておきます。
$ cat /etc/apt/sources.list deb http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi # Uncomment line below then 'apt-get update' to enable 'apt-get source' #deb-src http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi
ミラー設定
vim でsource.listを開いて以下のように書き換えます。
$ vim /etc/apt/sources.list
旧
# deb http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi # Uncomment line below then 'apt-get update' to enable 'apt-get source' #deb-src http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi
先頭に2行追加します。
新
deb http://ftp.jaist.ac.jp/raspbian/ stretch main contrib non-free rpi deb http://ftp.tsukuba.wide.ad.jp/Linux/raspbian/raspbian/ stretch main contrib non-free rpi # deb http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi # Uncomment line below then 'apt-get update' to enable 'apt-get source' #deb-src http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi
Raspbianのミラーサイト一覧を確認して、お住いの地域に一番近いサーバを選択するとよいと思います。
設定の反映
上記ファイルを保存したら、以下の通り設定を反映します。
$ sudo apt-get update
以上です。
コメント
いや、最も近い鯖より、
“日本最速ミラー”の異名を持つ
JAIST指定した方が良いかと。