Login
Newsletter
Werbung

So, 20. Mai 2007, 00:00

Home-Server mit Ubuntu 6.06 LTS, Teil 5

Home-Server mit Ubuntu 6.06 LTS, Teil 5.

Von mmu

Erstes Update des Servers und Einrichtung der APT-Quellen

APT ist das zentrale Paketverwaltungs-System von Debian und kommt daher natürlich auch in Ubuntu zum Einsatz. Ich werde in diesem Abschnitt einige Worte über die Softwarequellen von Ubuntu verlieren, die Datei /etc/apt/sources.list bearbeiten und den Server auf den neuesten Stand bringen.

Mehr zu APT findet man in der Manpage.

Die Quellen von APT werden in der Datei /etc/apt/sources.list konfiguriert. Sie sollte in etwa wie folgt aussehen:

# deb cdrom:[Ubuntu-Server 6.06.1 _Dapper Drake_ - Release i386 (20060807.1)]/ dapper main restricted
deb cdrom:[Ubuntu-Server 6.06.1 _Dapper Drake_ - Release i386 (20060807.1)]/ dapper main restricted
deb http://ch.archive.ubuntu.com/ubuntu/ dapper main restricted
deb-src http://ch.archive.ubuntu.com/ubuntu/ dapper main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://ch.archive.ubuntu.com/ubuntu/ dapper-updates main restricted
deb-src http://ch.archive.ubuntu.com/ubuntu/ dapper-updates main restricted
## Uncomment the following two lines to add software from the 'universe'
## repository.
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
# deb http://ch.archive.ubuntu.com/ubuntu/ dapper universe
# deb-src http://ch.archive.ubuntu.com/ubuntu/ dapper universe
## Uncomment the following two lines to add software from the 'backports'
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb http://ch.archive.ubuntu.com/ubuntu/ dapper-backports main restricted universe multiverse
# deb-src http://ch.archive.ubuntu.com/ubuntu/ dapper-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu dapper-security main restricted
deb-src http://security.ubuntu.com/ubuntu dapper-security main restricted
# deb http://security.ubuntu.com/ubuntu dapper-security universe
# deb-src http://security.ubuntu.com/ubuntu dapper-security universe

Dabei ist mir als erstes folgender Eintrag aufgefallen:

deb cdrom:[Ubuntu-Server 6.06.1 _Dapper Drake_ - Release i386 (20060807.1)]/ dapper main restricted

Er führt dazu, dass APT bei vielen Installation auf das CD-Laufwerk zurückgreift. Wenn man will, kann man das so lassen - nur müsste man dann eigentlich immer die Ubuntu-CD im CD-Laufwerk auf dem Server haben, was ich weniger sinnvoll finde. Die Zeile kann aber durchaus Sinn haben, vor allem dann, wenn man über eine langsame Internetleitung verfügt. Die entsprechenden Dateien werden so nämlich direkt von der CD aus installiert. Das sieht dann z.B. so aus:

fish@fishbox:~$ sudo apt-get build-dep rsnapshot
Reading package lists... Done
Building dependency tree... Done
The following NEW packages will be installed:
 autotools-dev binutils build-essential cpp cpp-4.0 debconf-utils debhelper
dpkg-dev g++ g++-4.0 gcc gcc-4.0 gettext html2text
 intltool-debian libc6-dev libstdc++6-4.0-dev linux-kernel-headers make patch
po-debconf
0 upgraded, 21 newly installed, 0 to remove and 0 not upgraded.
Need to get 2985kB/14.1MB of archives.
After unpacking 55.1MB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Get:1 http://ch.archive.ubuntu.com dapper-updates/main libc6-dev
2.3.6-0ubuntu20.4 [2822kB]
Media change: please insert the disc labeled
 'Ubuntu-Server 6.06.1 _Dapper Drake_ - Release i386 (20060807.1)'
in the drive '/cdrom/' and press enter

Da ich nicht immer die Ubuntu-CD im CD-ROM haben will, kommentiere ich die entsprechende Zeile in /etc/apt/sources.list aus:

# deb cdrom:[Ubuntu-Server 6.06.1 _Dapper Drake_ - Release i386 (20060807.1)]/ dapper main restricted

Das # am Anfang verhindert den Zugriff auf die CD - stattdessen lädt APT die Pakete nun einfach aus dem Netz.

Den Rest lassen wir so und führen nun gleich ein erstes Update des Servers durch:

fish@fishbox:~$ sudo apt-get update
Password:
Get:1 http://ch.archive.ubuntu.com dapper Release.gpg [189B]
Get:2 http://ch.archive.ubuntu.com dapper-updates Release.gpg [191B]
Get:3 http://security.ubuntu.com dapper-security Release.gpg [191B]
[...]
Reading package lists... Done
fish@fishbox:~$ sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree... Done
Calculating upgrade... Done
The following NEW packages will be installed:
 linux-image-2.6.15-28-server
The following packages will be upgraded:
 bind9-host cpio dnsutils dpkg dselect file gnupg gzip info
 libapache2-mod-php5 libbind9-0 libc6 libc6-i686 libdns21 libgnutls12
 libisc11 libisccc0 libisccfg1 libkrb53 liblwres9 libmagic1
 libmysqlclient15off libssl0.9.8 linux-image-2.6.15-26-server
 linux-image-server linux-server locales lvm2 mysql-client-5.0 mysql-common
 mysql-server mysql-server-5.0 openssl php5-common php5-mysql php5-mysqli
 python2.4 python2.4-minimal tar tcpdump w3m
41 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 102MB of archives.
After unpacking 67.7MB of additional disk space will be used.
Do you want to continue [Y/n]? Y

Viele Ausgaben, aber was ist genau passiert? Zuerst haben wir unsere lokale Paketdatenbank mit sudo apt-get update auf den neuesten Stand gebracht. Dieser Befehl ruft in den konfigurierten Repositorien (Softwarequellen) in /etc/apt/sources.list die neuesten Paketlisten ab und »synchronisiert« diese mit unserer lokalen. Das System weiss also nun, welche Pakete neu vorhanden sind und was man updaten müsste. Das anschliessende sudo apt-get dist-upgrade führt genau dieses Upgrade durch. In meinem Fall mussten 102 MB an Daten heruntergeladen werden und es waren wichtige Sicherheitsupdates dabei, unter anderem für den Kernel und den Webserver Apache.

Kommentare (Insgesamt: 0 )
Pro-Linux
Pro-Linux @Facebook
Neue Nachrichten
Werbung