概述
Ubuntu软件包分为4种:main、restricted、universe(公共的)、multiverse(多元化的)。
其中main和universe的软件提供源代码。
Ubuntu软件包位于Ubuntu镜像站点的目录树中。
- dists/
- pool/
- indices/
- project/: 供开发人员使用
问题:如何控制Ubuntu去哪个目录下载或更新?
发行版
Ubuntu的发行版:
Hardy Heron
8.04
Intrepid Ibex
8.10
Jaunty Jackalope
9.04
Karmic Koala
9.10
Lucid Lynx
10.04 LTS (支持3年)
利用chroot可以在不同的终端同时运行不同版本的Ubuntu。问题:如何实现?
虚拟软件包
定义:具有相近功能的软件组成。安装其中任意一个就能完成指定的功能。如:exim/exim4/postfix/sendmail就属于一个虚拟软件包mail-transport-agent(邮件传输代理)。
利用update-alternatives 指定虚拟软件包中的首选软件。 问题:试一下!
如何阻止软件包升级
(step 1) dpkg --get-selections /* > selections.txt
(step 2) 编辑selections.txt,如:libc6 install -> libc6 hold
(step 3) dpkg --set-selections < selections.txt
或者:
echo libc6 hold | dpkg --set-selections
或者:
利用dselect。 问题:试一下!
APT工具 (the Advanced Packaging Tool)
· apt-get
· apt-cache
· apt-cdrom
APT还是dselect和aptitude的后台程序。
Ø 下面几条命令的区别。
· apt-get update
更新源里的软件包信息到本机
· apt-get upgrade
只升级那些有更新版本的软件包,但只获取Depends类型的软件包,忽略 Recommends 和Suggests的软件包。
· apt-get dist-upgrade
对整个系统升级
创建文件系统的方案
http://b.gkp.cc/2010/10/12/install-ubuntu-1010-maverick-with-flash-disk/
Hardy Heron
8.04
Intrepid Ibex
8.10
Jaunty Jackalope
9.04
Karmic Koala
9.10
Lucid Lynx
10.04 LTS (支持3年)
· apt-get update
更新源里的软件包信息到本机
· apt-get upgrade
只升级那些有更新版本的软件包,但只获取Depends类型的软件包,忽略 Recommends 和Suggests的软件包。
· apt-get dist-upgrade
对整个系统升级