| HOME | INDEX |

   
 

aptの設定

   
     

初期設定 apt-setup

   


インターネット上のパッケージをインストールする為にaptの設定を行う。


# apt-setup

パッケージの入手先を選択する。「ftp」を選択。


---------------------+ Apt Configration +-------------------------

Apt can access the Debian archive in a varity of ways. Choose the
access method apt should user. For example if you have a Debian cd,
select "cdrom", while if you plan to install via a Debian mirror,
choose "ftp" or "http".

You probably used a CD to install the Debian base system, but it is not
currently in the driver. You should probaly just insert it and select
"cdrom"

Choose the method apt should use to access the Debian archive:

          cdrom
          http
          ftp
          filesystem
          edit sources list by hand


             <Ok> <Cancel>

「non-free」パッケージを使用するかと聞いてくるので、「Yes」を選択。


---------------------+ Apt Configration +-------------------------

Some non-free software has been made to work with Debian. Thougt this
software is not at all a oart of Debian, standard Debian tools can be
used to install it. This software has varying licenses which to have
it available anyway?

Use non-free software?


             <Yes> <No>

「contrib」パッケージを使用するかと聞いてくるので、「Yes」を選択。


---------------------+ Apt Configration +-------------------------

Some additional software has been made to work with Debian. Thougt this
software is free, it depends on non-free software for its operation.
This software is not at all a part of Debian, but standard Debian tools
can be to install it. Would you like to have it available?

Use contrib software?


             <Yes> <No>

サーバが設置されている国「Japan」を選択。


---------------------+ Apt Configration +-------------------------

Select the country the mirror should be in. The goal is to find a
mirror that is close to you on the network -- be aware that near
countries, or even your own, may not be the best choice.

Select a country:

           Israel 
           Itary
           Japan
           Korea (South)
           Latvia

             <Ok> <Cancel>

サーバ「ftp.jp.debian.org」を選択。


---------------------+ Apt Configration +-------------------------

Select the Debian mirror apt should use. You should select a mirror
that is close to you on the net.

Choose the Debian mirror to use:

           SunSITE.sut.ac.jp
           ftp.jp.debian.org
           dennou-h.ees.hokudai.ac.jp
           ring.asahi-net.or.jp

             <Ok> <Cancel>

プロキシ・サーバは何も設定しない。


---------------------+ Apt Configration +-------------------------

If you need to use a http proxy to access the outside world, enter the
proxy information here. Otherwise, leave this blank.

When entering proxy information, use the standard from of
"http://[[user][:pass]@]host[:port]"

Enter http proxy information, or leave blank for nome:

_________________________________________________________________


             <Ok> <Cancel>

他のサーバは使用しないので「No」を選択。


---------------------+ Apt Configration +-------------------------

Apt is now configured, and should be able to install Debian packages.
However, you may want to add another source to apt it can download
packages from more than one location.

Add another apt source?

_________________________________________________________________


             <Yes> <No>


 

設定変更

   



# vi /etc/apt/source.lst

以下のように変更する。


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.

# もし Debian パッケージの description (説明文) を日本語で読みたいならば
# 次の 2 行の先頭の # を外し、さらにその次の 1 行を # でコメントアウトしてください。
#deb ftp://ftp.jp.debian.org/debian-ddtp ja/stable main
#deb ftp://ftp.jp.debian.org/debian stable contrib non-free
deb ftp://ftp.jp.debian.org/debian stable main contrib non-free
deb ftp://ftp.jp.debian.org/debian-non-US stable/non-US main contrib non-free
deb ftp://ftp.jp.debian.org/debian-jp stable-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/ stable/updates main contrib non-free

# Uncomment if you want the apt-get source function to work
#deb-src ftp://ftp.jp.debian.org/debian stable main contrib non-free
#deb-src ftp://ftp.jp.debian.org/debian-non-US stable/non-US main contrib non-free
#deb-src ftp://ftp.jp.debian.org/debian-jp stable-jp main contrib non-free


APT のパッケージ情報のデータベースを更新し、sources.list の内容を反映させる。


# apt-get update

 

apt-get install

   


sources.list を使って、パッケージをインストールする場合。以下はapacheのインストール。


# apt-get install apache

apt-get remove

   


sources.list を使って、インストールされているパッケージを削除する場合。以下はapacheの削除。


# apt-get remove apache

apt-get dist-upgrade

   


インストールされているすべてのパッケージをアップグレードする場合。


# apt-get dist-upgrade

apt-cache

   


apt-cache は APT のパッケージ管理情報を参照したり検索したりすることが出来る。
以下は apache の依存関係を調べる場合の例。


# apt-cache depends apache

パッケージの検索には以下のする。


# apt-cache search apache

 
 
   
Copyright © 2002-2004 by mallet, All rights reserved