普通に使う分には以下の設定が無難。以前はこの設定情報のことを apt-line と呼んでいたらしい (いまでも apt-line と呼ぶのかどうか公式情報をさがしたけど見つからなかった)。


# cat /etc/apt/sources.list
deb http://ftp.jp.debian.org/debian/ wheezy main contrib non-free
deb http://ftp.jp.debian.org/debian/ wheezy-updates main contrib non-free
deb http://security.debian.org/ wheezy/updates main contrib non-free
deb-src http://ftp.jp.debian.org/debian/ wheezy main contrib non-free
deb-src http://ftp.jp.debian.org/debian/ wheezy-updates main contrib non-free
deb-src http://security.debian.org/ wheezy/updates main contrib non-free

セキュリティ・アップデートのため、定期的に以下の2つのコマンドを実行するのが望ましい。


# aptitude update
# aptitude safe-upgrade
apt を使うと、簡単に最新のセキュリティアップデートを取得することができます。 こちらを利用するためにはご自分の /etc/apt/sources.list ファイルに

deb http://security.debian.org/ wheezy/updates main contrib non-free

という行が必要になります。それから apt-get update && apt-get upgrade を実行して未処理の更新をダウンロード、適用してください。 セキュリティアーカイブは通常の Debian アーカイブ署名用の鍵で署名されています。

Debian -- セキュリティ情報

正直言うと、 sources.list に設定する内容について詳しく書かれた公式文書(の日本語版)がどこにも見つからなかったので、URL毎に指定可能なセクションの情報とかがよくわかっていない。

追記: 2014-04-20

cdn.debian.net はあなたが Debian を使用しているネットワークが属する国・地域に最適化したミラーサーバを選択します。ftp.jp.debian.org はあなたが他国にいたときでも常に日本国内のミラーサーバを選択します

Debian JP Project - CDN 対応ミラーの設定
ftp.jp.debian.org は cdn.debian.or.jp と同じ実体

Debian JP Project - ミラーサイトについて
Debian プロジェクトは、次期安定版 (stable) リリース Debian 7 (コード名 "Wheezy") 向けの backports サービスが main アーカイブの一部になることを発表できることを嬉しく思います。 Backports は主にテスト版 (testing) ディストリビューション (例えばセキュリティ更新等で、不安定版 (unstable) を使うこともあります) のパッケージを安定版 (stable) 環境で再コンパイルしたもので、新しいライブラリを使わずに Debian の安定版 (stable) ディストリビューションで (用意でき次第) 利用できるようになります。 このサービスはこれまで別個のアーカイブで提供されていましたが、wheezy-backports からは通常の場所からパッケージにアクセスできるようになります。
"Wheezy" ユーザがこれを利用するには sources.list ファイルに次のエントリを追加する必要があります:

deb http://ftp.debian.org/debian/ wheezy-backports main

Debian -- ニュース -- Backports の main アーカイブへの統合

ということは、日本国内に限らない設定にしつつ、バックポートのパッケージもインストールできるようにした /etc/apt/sources.list の完全形はこんな感じ。


deb http://cdn.debian.net/debian/ wheezy main contrib non-free
deb http://cdn.debian.net/debian/ wheezy-updates main contrib non-free
deb http://cdn.debian.net/debian/ wheezy-backports main contrib non-free
deb http://security.debian.org/ wheezy/updates main contrib non-free
deb-src http://cdn.debian.net/debian/ wheezy main contrib non-free
deb-src http://cdn.debian.net/debian/ wheezy-updates main contrib non-free
deb-src http://cdn.debian.net/debian/ wheezy-backports main contrib non-free
deb-src http://security.debian.org/ wheezy/updates main contrib non-free

tags: debian

Posted by NI-Lab. (@nilab)