カテゴリー
- coLinux
- coLinux QuickStart
- debianインストール
- debian設定
トピックス
1. aptとは
1.1 aptとはなにか
apt(Advanced Package Tool)はdebianに使われているパッケージ管理ツールです。debianでは.debパッケージファイルでツールのインストールができます。aptではインストールに必要なその他のパッケージを自動でインストールすることができます。
1.1 aptの動作
aptはCD-ROMあるいはWeb上に構築されたAPTリポジトリを使用し、ここから更新されたファイルやインストールするファイルを検索します。
aptリポジトリは/etc/apt/sources.listに設定が保存されています。
2. aptの初期設定
2.1 aptリポジトリの設定
aptを使うには、aptリポジトリを設定する必要があります。
すでにaptリポジトリの設定はできていますが、応答速度などの問題があります。ここでは、理研のaptリポジトリにつなぐように/etc/apt/sources.listを設定します。
次のように/etc/apt/sources.listを設定します。
- /etc/apt/sources.list
# See sources.list*5( for more information, especialy # Remember that you can only use http, ftp or file URIs # CDROMs are managed throught the apt-cdrom tool. deb http://ring.riken.jp/pub/linux/debian/debian etch main contrib non-free deb http://security.debian.org/ etch/updates main contrib non-free
以上で、aptリポジトリの設定は終了です。
2.2 パッケージ情報の取得
aptを使うためにはあらかじめパッケージ情報を取得する必要があります。
次の手順で、パッケージ情報を取得します。
- rootでログインします。
debian login: root debian:~#
- aptitudeコマンドを使って、パッケージ情報を取得します。
debian:~# aptitude update Get:1 http://ring.riken.jp etch Release.gpg [378B] Hit http://ring.riken.jp etch Release Ign http://ring.riken.jp etch/main Packages/DiffIndex Ign http://ring.riken.jp etch/contrib Packages/DiffIndex Ign http://ring.riken.jp etch/non-free Packages/DiffIndex Hit http://ring.riken.jp etch/main Packages Hit http://ring.riken.jp etch/contrib Packages Hit http://ring.riken.jp etch/non-free Packages Get:2 http://security.debian.org etch/updates Release.gpg [189B] Hit http://security.debian.org etch/updates Release Ign http://security.debian.org etch/updates/main Packages/DiffIndex Ign http://security.debian.org etch/updates/contrib Packages/DiffIndex Ign http://security.debian.org etch/updates/non-free Packages/DiffIndex Hit http://security.debian.org etch/updates/main Packages Hit http://security.debian.org etch/updates/contrib Packages Hit http://security.debian.org etch/updates/non-free Packages Fetched 2B in 2s (1B/s) Reading package lists... Done debian:~#
以上で、パッケージ情報の取得は終了です。