chibi style
    

Home > Debian > 基本設定 > APTの設定と簡単な使用方法

APTの設定

/etc/apt/sources.listを編集。こちらのサイトを参考にミラーサイトを見つけ、テンプレを参考に記述をする。
うちはこんな感じにしてみた。#はコメント行で有効になっていない状態

# vi /etc/apt/sources.list
deb ftp://ftp.jp.debian.org/debian sarge main contrib non-free
deb ftp://ftp.jp.debian.org/debian-jp sarge-jp main contrib non-free

#deb ftp://ftp.jp.debian.org/debian proposed-updates main contrib non-free
#deb ftp://ftp.jp.debian.org/debian-jp proposed-updates-jp main contrib non-free

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

#deb-src ftp://ftp.jp.debian.org/debian stable main contrib non-free
#deb-src ftp://ftp.jp.debian.org/debian-jp stable-jp main contrib non-free


編集後

# apt-get update
# apt-get upgrade


>>このページのTOPへ

APTコマンドの簡単な使用方法

データベースの更新(全てはここから)
# apt-get update

パッケージを最新のものにアップグレード
# apt-get upgrade

アップグレード可能なパッケージを確認したいだけの場合
# apt-get -s upgrade	←-sはシュミレーション

パッケージのインストール(例:Apache2)
# apt-get install apache2

インストール済みのパッケージの情報を表示
# dpkg -s apache2

インストール済みパッケージ全部表示
# dpkg -l

パッケージの削除
# apt-get remove apache2

設定ファイルも含めパッケージの削除
# apt-get --purge remove apache2

パッケージの検索
# apt-cache search postfix

パッケージの情報を表示
# apt-cache show postfix

パッケージの依存関係を調べる
# apt-cache depends postfix


>>このページのTOPへ

最終更新 : 09/26/2005


Copyright © 2004-2007 chibi ,All Rights Reserved