next up previous
Nächste Seite: 8.3 dselect Aufwärts: 8 Paket-Management Vorherige Seite: 8.1 dpkg

8.2 Upgrade einer Debian-Distribution mit apt

Ein Upgrade einer Debian auf eine neuere Version (z.B.: 2.2 -> 2.4) ist mittels apt-get sehr einfach möglich:

In /etc/apt/sources.list statt potato oder woody den gewünschten Distribuions-Zweig (meist stable) eintragen:

   deb http://ftp.de.debian.org/debian             stable main contrib non-free
   deb http://ftp.de.debian.org/debian-non-US      stable/non-US main contrib non-free
   deb-src  http://ftp.debian.org/debian           stable main contrib non-free
   deb-src  http://ftp.de.debian.org/debian-non-US stable/non-US main contrib non-free

und anschließend

apt-get update
apt-get dist-upgrade

aufrufen:

tantalus:~# apt-get update
Get:1 http://ftp.de.debian.org stable/main Packages [827kB]
Hit http://ftp.debian.org stable/main Sources
Ign http://ftp.debian.org stable/main Release
Hit http://ftp.debian.org stable/contrib Sources
Ign http://ftp.debian.org stable/contrib Release
Hit http://ftp.debian.org stable/non-free Sources
Ign http://ftp.debian.org stable/non-free Release
Hit http://ftp.de.debian.org stable/main Release
Get:2 http://ftp.de.debian.org stable/contrib Packages [30.3kB]
Hit http://ftp.de.debian.org stable/contrib Release
Hit http://ftp.de.debian.org stable/non-free Packages
Hit http://ftp.de.debian.org stable/non-free Release
Hit http://ftp.de.debian.org stable/non-US/main Packages
Hit http://ftp.de.debian.org stable/non-US/main Release
Hit http://ftp.de.debian.org stable/non-US/contrib Packages
Hit http://ftp.de.debian.org stable/non-US/contrib Release
Hit http://ftp.de.debian.org stable/non-US/non-free Packages
Hit http://ftp.de.debian.org stable/non-US/non-free Release
Hit http://ftp.de.debian.org stable/non-US/main Sources
Hit http://ftp.de.debian.org stable/non-US/main Release
Hit http://ftp.de.debian.org stable/non-US/contrib Sources
Hit http://ftp.de.debian.org stable/non-US/contrib Release
Hit http://ftp.de.debian.org stable/non-US/non-free Sources
Hit http://ftp.de.debian.org stable/non-US/non-free Release
Fetched 857kB in 4s (175kB/s)
Reading Package Lists... Done
Building Dependency Tree... Done


tantalus:~# apt-get dist-upgrade
Reading Package Lists... Done
Building Dependency Tree... Done
Calculating Upgrade... Done
45 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 27.0MB of archives. After unpacking 10.2MB will be used.
Do you want to continue? [Y/n]
Get:1 http://ftp.de.debian.org stable/main libc6 2.1.3-18 [1901kB]
Get:2 http://ftp.de.debian.org stable/main cron 3.0pl1-57.2 [51.0kB]
Get:3 http://ftp.de.debian.org stable/main mailx 1:8.1.1-11 [101kB]
Get:4 http://ftp.de.debian.org stable/main man-db 2.3.16-1.1 [333kB]
Get:5 http://ftp.de.debian.org stable/main nvi 1.79-16a [263kB]
Get:6 http://ftp.de.debian.org stable/main dnsutils 1:8.2.3-0.potato.1 [340kB]
...
Debian Configuration
...
(Reading database ... 42629 files and directories currently installed.)
Preparing to replace libc6-dev 2.1.3-13 (using .../libc6-dev_2.1.3-18_i386.deb) ...
Unpacking replacement libc6-dev ...
Preparing to replace locales 2.1.3-13 (using .../locales_2.1.3-18_i386.deb) ...
Unpacking replacement locales ...
Preparing to replace libc6 2.1.3-13 (using .../libc6_2.1.3-18_i386.deb) ...
Unpacking replacement libc6 ...
Setting up libc6 (2.1.3-18) ...
Current default timezone: 'Europe/Berlin'.
   Local time is now:      Sun May 20 22:12:32 CEST 2001.
   Universal Time is now:  Sun May 20 20:12:32 UTC 2001.
Run 'tzconfig' if you wish to change it.

(Reading database ... 42660 files and directories currently installed.)
Preparing to replace cron 3.0pl1-57.1 (using .../cron_3.0pl1-57.2_i386.deb) ...
...
Stopping MySQL database server: mysqld.
Unpacking replacement mysql-server ...
...
Setting up libc6-dev (2.1.3-18) ...

Setting up locales (2.1.3-18) ...

Setting up cron (3.0pl1-57.2) ...
...
Setting up mysql-server (3.22.32-6) ...
Starting MySQL database server: mysqld.
...

Setting up mc (4.5.42-11.potato.6) ...
Installing new version of config file /etc/mc/mc.ext ...

tantalus:~#
tantalus:~# apt-get check
Reading Package Lists... Done
Building Dependency Tree... Done
tantalus:~#

Dadurch wurden nun alle momentan installierten Pakete auf den gewünschten aktuellen Stand gebracht.

Weitere Informationen gibt es in den Manseiten zu apt-get und in /usr/doc/apt/.



Rene Scholz 2001-11-21