以現實社會作比喻加深理解: 1.在這地球上有許多餐廳 (debian 套件伺服器,debian package server [ftp/http])。 2.販賣各式各樣的餐點 (debian 的套件,debian packages)。 3.每家餐廳都會提供菜單 (debian 套件資訊表, debian available packages list) 供客戶查詢訂購。 4.公司選擇了幾家距離較近的餐廳 (設定 apt/source.list)。 5.然後請小弟去這幾家餐廳索取菜單 (更新套件資訊表, update available packages list)。 6.等到公司需要用餐的時候就會利用這幾張菜單 (available packages) ,勾選所需的餐點。 7.以電話訂購再派小弟前去取回餐點後用餐 (取回套件並安裝,get packages and Install)。 ps:餐廳菜單會更新,當打電話訂購時無法取貨,可在利用小弟前去索取菜單 (更新套件資訊表)。 而 tasksel 相當於各家餐廳的套餐。 |
Debian GNU/Linux `dselect' package handling frontend.
0. [A]ccess Choose the access method to use.
1. [U]pdate Update list of available packages, if possible.
* 2. [S]elect Request which packages you want on your system.
3. [I]nstall Install and upgrade wanted packages.
4. [C]onfig Configure any packages that are unconfigured.
5. [R]emove Remove unwanted software.
6. [Q]uit Quit dselect.
#-> 選 0
nfs Install from an NFS server (not yet mounted).
floppy Install from a pile of floppy disks.
ftp Install using ftp.
* apt APT Acquisition [file,http,ftp]
#-> 選 apt
I see you already have a source list.
------------------------------------------------------------------------
deb ftp://192.168.2.1/debian stable main contrib
------------------------------------------------------------------------
Do you wish to change (overwrite) it?[y/N] y
Set up a list of distribution source locations
Please give the base URL of the debian distribution.
The access schemes I know about are: http ftp file
For example:
file:/mnt/debian,
ftp://ftp.debian.org/debian,
http://ftp.de.debian.org/debian,
URL [http://http.us.debian.org/debian]:ftp://192.168.2.1/debian
#-> ftp://192.168.2.1/debian
#-> 192.168.2.1 遠端主機的 IP 或是 doname
#-> 常見的有 ftp.jp.debian.org
#-> 常見的有 ftp.us.debian.org 等
#-> 細節可前往 www.debian.org 查看
#-> /debian 是對方 debian 目錄存放位置,通常為 debian
URL [http://http.us.debian.org/debian]: ftp://192.168.2.1/debian
Please give the distribution tag to get or a path to the
package file ending in a /. The distribution
tags are typically something like: stable unstable frozen non-US
Distribution [stable]: stable
#-> stable 穩定版本
#-> unstable 開發版本
#-> frozen 凍結版本
#-> non-US 美國禁止輸出版本
#-> 請使用 stable 版本。potato woody sid ....
Please give the components to get
The components are typically something like: main contrib non-free
Components [main contrib non-free]: main contrib non-free
#-> debian 是個強調自由的軟體,他依照版權性質區分為以下三類。
#-> main 主系統
#-> contrib 捐贈軟體
#-> non-free 非自由軟體
Would you like to add another source?[y/N] n
Debian GNU/Linux `dselect' package handling frontend.
0. [A]ccess Choose the access method to use.
* 1. [U]pdate Update list of available packages, if possible.
2. [S]elect Request which packages you want on your system.
3. [I]nstall Install and upgrade wanted packages.
4. [C]onfig Configure any packages that are unconfigured.
5. [R]emove Remove unwanted software.
6. [Q]uit Quit dselect.
#-> 選 1
#-> 將遠端的套間資訊取回,完成 apt 設定。
#-> 選 6 離開
查看 /etc/apt/source.list
# cat /etc/apt/source.list
deb ftp://192.168.2.1/debian stable main contrib non-free
|
0. [A]ccess Choose the access method to use.
設定遠端的 debian 套件伺服器。(ps 可以同時設定多個伺服器)
(除了設定 apt 外不必每次都設定使用)
1. [U]pdate Update list of available packages, if possible.
取回遠端伺服器上套件資訊。更新機器的可取的套件資料庫。
(除了你想更新套件資訊外,不必每次都設定使用)
* 2. [S]elect Request which packages you want on your system.
安裝套件,移除套件。
3. [I]nstall Install and upgrade wanted packages.
安裝。
4. [C]onfig Configure any packages that are unconfigured.
強制尚未設定好的套件。(不必每次都使用)
5. [R]emove Remove unwanted software.
移除套件。
6. [Q]uit Quit dselect.
離開 dselect
dselect 0 除了想更改遠端伺服器外,平時並不需要更動或是執行。
dselect 1 除了你想取回最新的套件資訊外,平時並不需要執行。
dselect 2 3 6 才是我們最常使用的功能。
dselect 4 5 除了發生問題以外平常是不使用的。
3 [I]nstall 會將你想安裝,想移除的套件一並處理。故並不需要特別使用功能 4 5。
進入 dselect 的 select 模式下直接按「空白鍵」跳過 求助 選單畫面。
=======================================================
dselect 進入 select 模式下常用的功能鍵有
/ 輸入尋找的關鍵字串[Enter鍵]
/ [Enter鍵]再次尋找
+ 增加(shift+=)
- 移除(shift+-)
Q 離開 select 模式 (shift+q)
? help
=======================================================
選好套件後回到主選單,選擇 3 進行套件安裝移除的動作。完成後直接選 6 離開。 |
tasksel 主要的目的在於將套件分門別類,依任務的屬性分類便利使用者快速安裝,免除 套件過多安裝手續繁雜的困難。「空白鍵」用來選擇取消,「tab鍵」用來切換跳躍位置到底下的確認完成鍵 ,tasksel 太簡單了,自己用看看吧?
安裝方式: apt-get install aptitude 常用的功能鍵有: / 輸入尋找的關鍵字串[Enter鍵] / [Enter鍵]再次尋找 + 增加(shift+=) - 移除(shift+-) u 與遠端伺服器資料同步 g 安裝 q 離開 select 模式 (shift+q) ? help F10 下拉式選單 |
常用的 apt-get 命令 只有 install remove
範例如下
apt-get install jed #安裝 jed
apt-get remove jed #移除 jed
以下是 apt-get 的 help
# apt-get
apt 0.3.19 for i386 compiled on May 12 2000 21:17:27
Usage: apt-get [options] command
apt-get [options] install pkg1 [pkg2 ...]
apt-get is a simple command line interface for downloading and
installing packages. The most frequently used commands are update
and install.
Commands:
update - Retrieve new lists of packages
upgrade - Perform an upgrade
install - Install new packages (pkg is libc6 not libc6.deb)
remove - Remove packages
source - Download source archives
dist-upgrade - Distribution upgrade, see apt-get(8)
dselect-upgrade - Follow dselect selections
clean - Erase downloaded archive files
autoclean - Erase old downloaded archive files
check - Verify that there are no broken dependencies
|
實務上並不常使用 dpkg 作為安裝工具,反倒是較常使用 aptitude dselect apt-get 這類高階的工具, 以下是 dpkg 常用的指令。 dpkg -l #列出所有安裝的套件 dpkg -l | grep jed #擷取 jed 關鍵字的套件列表 dpkg -L jed #列出 jed 套件包含的檔案 dpkg -s jed #列出 jed 的套件資訊 |
這個網頁記載了所有的 debian mirror list 你可以來查詢 http://www.debian.org/mirror/list 我提供幾個台灣的 mirror site debian.linux.org.tw/debian linux.cdpa.nsysu.edu.tw/debian |