#author("2019-07-20T15:29:38+09:00","","") #author("2019-07-20T15:36:19+09:00","","") #navi(../) * Raspbianを日本のリポジトリサーバに変更する・buster [#l03d0d14] Raspbianのソフトウェアアップデートをする場合、デフォルトだと以下のURLになっています。~ http://raspbian.raspberrypi.org/raspbian/~ これを日本のサーバに変更することにより、Raspbianのアップデートファイルのダウンロードが早くなります。~ (近いサーバなので当然ですよね。)~ 以下、リポジトリサーバの変更手順を記します。 #htmlinsert(minipc-top.html) #contents * Raspbian OS [#ib326055] 設定変更を行ったRaspbianのバージョンは以下の通りです。 $ lsb_release -dr Description: Raspbian GNU/Linux 10 (buster) Release: 10 * /etc/apt/sources.listを編集する [#m4e7f2e9] ''/etc/apt/sources.list''ファイルにリポジトリサーバの情報が記載されています。~ 本ファイルを日本のサーバに変更することになります。 ** 使用する日本のリポジトリサーバ [#b6db3b0e] 以下、URLをブラウザで確認するとミラーの一覧が表示されます。~ http://www.raspbian.org/RaspbianMirrors~ 日本に関しては以下の3つが記載されていました。 |''CONTINENT''|''COUNTRY''|''MIRROR''|''DEB/DEB-SRC ADDRESS''| |Asia|Japan|JAIST|http://ftp.jaist.ac.jp/raspbian&br;(http|rsync)://ftp.jaist.ac.jp/pub/Linux/raspbian-archive/raspbian| |Asia|Japan|WIDE Project Tsukuba NOC|http://ftp.tsukuba.wide.ad.jp/Linux/raspbian/raspbian/&br;rsync://ftp.tsukuba.wide.ad.jp/raspbian/raspbian/| |Asia|Japan|Yamagata University|http://ftp.yz.yamagata-u.ac.jp/pub/linux/raspbian/raspbian/| 本資料では、[[JAIST 北陸先端科学技術大学院大学>https://www.jaist.ac.jp/]]が公開しているリポジトリサーバを利用する手順を記します。 使用するJAIST 北陸先端科学技術大学院大学のリポジトリURLをは上記表の通り、以下のURLをになります。 http://ftp.jaist.ac.jp/raspbian * sources.listの修正作業 [#gf6d7a30] sources.listをJAIST 北陸先端科学技術大学院大学のリポジトリに変更します。~ 本資料では、テキストエディタにLeafPadを使用します。~ 他のテキストエディタでも構いませんので、LeafPadの部分を読み替えてください。 + LXTerminal &ref(t.png); を起動します。 + 起動したターミナルに以下のコマンドを入力しEnterキーを押します。 sudo leafpad /etc/apt/sources.list #ref(01.png) #br + LeafPadが起動し、sources.listの内容が表示されます。 #ref(02.png) 上記内容のテキストです。 deb http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi # Uncomment line below then 'apt-get update' to enable 'apt-get source' #deb-src http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi #br + 以下の部分を日本のリポジトリサーバURLに変更します。 -- 変更対象部分 http://raspbian.raspberrypi.org/raspbian/ -- 変更内容 http://ftp.jaist.ac.jp/raspbian #br + 以下のように既存の行をコピーしリポジトリサーバのURL部分を置換し、~ もともとの設定は # にてコメント化しました。~ これにより、編集ミスなどで何かあってももとに戻せます。 #ref(03.png) 以下、編集後のテキストです。 deb http://ftp.jaist.ac.jp/raspbian buster main contrib non-free rpi # deb http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi # Uncomment line below then 'apt-get update' to enable 'apt-get source' #deb-src http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi +上記の修正が終わったら、上書き保存しLeafPadを終了させます。 ** 日本のリポジトリサーバ変更後の動作確認 [#r8698b0f] 上記の設定変更が終わったら、動作確認を行います。~ すでにターミナル(&ref(t.png);)は起動済みだと思いますので、以下のコマンドを入力し実行してみてください。 sudo apt update 以下、実際に実行したときの出力です。~ 変更した ftp.jaist.ac.jp が出力されています。 #ref(04.png) #br 2行目は ''/etc/apt/sources.list.d/raspi.list'' の設定ファイルになります。~ これは、http://archive.raspberrypi.org/''debian'' なので編集対象外としました。 これは、http://archive.raspberrypi.org/debian なので編集対象外としました。 以上、Raspbianのリポジトリを日本のリポジトリサーバに変更した手順でした。 #htmlinsert(minipc-btm.html)