Consulting, services, computer engineering. Implementation of technology solutions and support for businesses.

User Rating: 5 / 5

Star ActiveStar ActiveStar ActiveStar ActiveStar Active
 

Linux les gestionnaires de paquets

Ce cours fait partie de l'ensemble Linux à voir ici, sur Linux les fondamentaux ici et linux les commandes des bases du shell ici , ensuite linux et les droits sur les fichiers , Linux les gestionnaires de paquets , Linux editeur nano , linux configurer dhcp server et client , linux configurer dns server et client , linux disque durs et partitions , linux disque durs et partitions avec LVM

 

Linux les gestionnaires de paquets : généralité

 

Historiquement les logicels étaient distribués et installés sous forme d'archives, on la décompressait, on l'installait dans son format .zip ou .tar.gz avec le script install.

Ou alors on fait la compilation des fichiers source avec make

 

Sous Windows c'est un .exe et il fait tout automatiquement.

 

Le problème c'est que c'était un peu long en ligne de commande. Donc de plus en plus, les paquets officels sont disponibles via des gestionnaires de paquets. 

Quand on tape par exemple apt install, linux fait appel au gestionnaire d'installation et tout est installé, les dépendances etc.

 

Sous Windows, on a essayé de faire pareil avec msi

 

Ce sont des archives qui contiennent un programme et des méta données, par exemple la date de création, la version, la description, etc. Un fichier peut fonctionner sans méta données

 

Linux les gestionnaires de paquets : les depôts

 

Les dépots: c'est là où les paquets sont regroupés. C'est comme quand on va chez IKEA, au magasin, on regarde le produit, son nom et ce produit sera décliné de plusieurs façons, avec porte, sans porte, avec tirroir, sans tirroir, ça va être la même référence. Ensuite au sous sol il y a l'entrepot et on récupère le carton avec juste la référence ou le numéro de série. C'est pareil pour les depots.

 

exemple, sudo apt install net-tools

 

en tapant apt update on voit les liens des depots

 

On retrouve ces liens dans le fichier /etc/apt/sources.list pour une distriution linux debian.

cat  /etc/apt/sources.list

 

aperçu du sources.list:

 

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://archive.ubuntu.com/ubuntu/ focal main restricted
# deb-src http://archive.ubuntu.com/ubuntu/ focal main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted
# deb-src http://archive.ubuntu.com/ubuntu/ focal-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://archive.ubuntu.com/ubuntu/ focal universe
# deb-src http://archive.ubuntu.com/ubuntu/ focal universe
deb http://archive.ubuntu.com/ubuntu/ focal-updates universe
# deb-src http://archive.ubuntu.com/ubuntu/ focal-updates universe

## 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
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://archive.ubuntu.com/ubuntu/ focal multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ focal multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-updates multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ focal-updates multiverse

## 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://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu focal partner
# deb-src http://archive.canonical.com/ubuntu focal partner

deb http://security.ubuntu.com/ubuntu/ focal-security main restricted
# deb-src http://security.ubuntu.com/ubuntu/ focal-security main restricted
deb http://security.ubuntu.com/ubuntu/ focal-security universe
# deb-src http://security.ubuntu.com/ubuntu/ focal-security universe
deb http://security.ubuntu.com/ubuntu/ focal-security multiverse
# deb-src http://security.ubuntu.com/ubuntu/ focal-security multiverse

 

Ce sont des sites internets qui contiennet les paquets disponibles à l'installation. Si on en trouve pas un paquet il faut rajouter un lien 

Si on prend le 1er lien

security.debian.org/debian-security/

Quand on demande un package, linux apt vient cherche le paquet demandé dans cet espace de stockage. S'il le trouve il le télécharge, s'il ne le trouve pas, il va nous dire qu'il ne le trouve pas.

 

Pour installer docker par exemple, on doit rajouter manuellement des depots pour qu'il trouve les packages.

 

Linux les gestionnaires de paquets : update des depots

Mise à jour de la base de paquets locale:

sudo apt update

 

ubuntu@pclabo:/etc/ssh$ sudo apt update
[sudo] password for ubuntu:
Get:1 http://archive.ubuntu.com/ubuntu focal InRelease [265 kB]
Get:2 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Get:3 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Get:4 http://archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB]
Get:5 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages [970 kB]
Get:6 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages [909 kB]
Get:7 http://archive.ubuntu.com/ubuntu focal/main Translation-en [506 kB]
Get:8 http://archive.ubuntu.com/ubuntu focal/main amd64 c-n-f Metadata [29.5 kB]
Get:9 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages [8628 kB]
Get:10 http://security.ubuntu.com/ubuntu focal-security/main Translation-en [173 kB]
Get:11 http://security.ubuntu.com/ubuntu focal-security/main amd64 c-n-f Metadata [8824 B]
Get:12 http://security.ubuntu.com/ubuntu focal-security/restricted amd64 Packages [447 kB]
Get:13 http://security.ubuntu.com/ubuntu focal-security/restricted Translation-en [64.1 kB]
Get:14 http://security.ubuntu.com/ubuntu focal-security/restricted amd64 c-n-f Metadata [508 B]
Get:15 http://security.ubuntu.com/ubuntu focal-security/universe amd64 Packages [642 kB]
Get:16 http://security.ubuntu.com/ubuntu focal-security/universe Translation-en [103 kB]
Get:17 http://security.ubuntu.com/ubuntu focal-security/universe amd64 c-n-f Metadata [12.5 kB]
Get:18 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 Packages [21.9 kB]
Get:19 http://security.ubuntu.com/ubuntu focal-security/multiverse Translation-en [4948 B]
Get:20 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 c-n-f Metadata [540 B]
Get:21 http://archive.ubuntu.com/ubuntu focal/universe Translation-en [5124 kB]
Get:22 http://archive.ubuntu.com/ubuntu focal/universe amd64 c-n-f Metadata [265 kB]
Get:23 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 Packages [144 kB]
Get:24 http://archive.ubuntu.com/ubuntu focal/multiverse Translation-en [104 kB]
Get:25 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 c-n-f Metadata [9136 B]
Get:26 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [1258 kB]
Get:27 http://archive.ubuntu.com/ubuntu focal-updates/main Translation-en [265 kB]
Get:28 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 c-n-f Metadata [14.4 kB]
Get:29 http://archive.ubuntu.com/ubuntu focal-updates/restricted amd64 Packages [486 kB]
Get:30 http://archive.ubuntu.com/ubuntu focal-updates/restricted Translation-en [69.6 kB]
Get:31 http://archive.ubuntu.com/ubuntu focal-updates/restricted amd64 c-n-f Metadata [504 B]
Get:32 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [864 kB]
Get:33 http://archive.ubuntu.com/ubuntu focal-updates/universe Translation-en [184 kB]
Get:34 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 c-n-f Metadata [19.1 kB]
Get:35 http://archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 Packages [24.6 kB]
Get:36 http://archive.ubuntu.com/ubuntu focal-updates/multiverse Translation-en [6776 B]
Get:37 http://archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 c-n-f Metadata [620 B]
Get:38 http://archive.ubuntu.com/ubuntu focal-backports/main amd64 Packages [2568 B]
Get:39 http://archive.ubuntu.com/ubuntu focal-backports/main Translation-en [1120 B]
Get:40 http://archive.ubuntu.com/ubuntu focal-backports/main amd64 c-n-f Metadata [400 B]
Get:41 http://archive.ubuntu.com/ubuntu focal-backports/restricted amd64 c-n-f Metadata [116 B]
Get:42 http://archive.ubuntu.com/ubuntu focal-backports/universe amd64 Packages [5800 B]
Get:43 http://archive.ubuntu.com/ubuntu focal-backports/universe Translation-en [2068 B]
Get:44 http://archive.ubuntu.com/ubuntu focal-backports/universe amd64 c-n-f Metadata [276 B]
Get:45 http://archive.ubuntu.com/ubuntu focal-backports/multiverse amd64 c-n-f Metadata [116 B]
Fetched 22.0 MB in 14s (1623 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
243 packages can be upgraded. Run 'apt list --upgradable' to see them.

 

Pour les mettre à jour, on tape

 

apt list --upgradable

 

on voit tous les packets que l'on peut mettre à jour. Il télécharge te installe. A la main on aurait du récupérer les fichiers, les dézipper... Tout est automatique

 

accountsservice/focal-updates,focal-security 0.6.55-0ubuntu12~20.04.4 amd64 [upgradable from: 0.6.55-0ubuntu11]
alsa-ucm-conf/focal-updates 1.2.2-1ubuntu0.10 all [upgradable from: 1.2.2-1]
apparmor/focal-updates 2.13.3-7ubuntu5.1 amd64 [upgradable from: 2.13.3-7ubuntu5]
apport/focal-updates,focal-security 2.20.11-0ubuntu27.20 all [upgradable from: 2.20.11-0ubuntu27]
apt-utils/focal-updates 2.0.6 amd64 [upgradable from: 2.0.2]
apt/focal-updates 2.0.6 amd64 [upgradable from: 2.0.2]
base-files/focal-updates 11ubuntu5.4 amd64 [upgradable from: 11ubuntu5]
bash/focal-updates 5.0-6ubuntu1.1 amd64 [upgradable from: 5.0-6ubuntu1]
bcache-tools/focal-updates 1.0.8-3ubuntu0.1 amd64 [upgradable from: 1.0.8-3]
bind9-dnsutils/focal-updates,focal-security 1:9.16.1-0ubuntu2.8 amd64 [upgradable from: 1:9.16.1-0ubuntu2]
bind9-host/focal-updates,focal-security 1:9.16.1-0ubuntu2.8 amd64 [upgradable from: 1:9.16.1-0ubuntu2]
bind9-libs/focal-updates,focal-security 1:9.16.1-0ubuntu2.8 amd64 [upgradable from: 1:9.16.1-0ubuntu2]
bolt/focal-updates 0.8-4ubuntu1 amd64 [upgradable from: 0.8-4]
bsdutils/focal-updates 1:2.34-0.1ubuntu9.1 amd64 [upgradable from: 1:2.34-0.1ubuntu9]
busybox-initramfs/focal-updates 1:1.30.1-4ubuntu6.3 amd64 [upgradable from: 1:1.30.1-4ubuntu6]
busybox-static/focal-updates 1:1.30.1-4ubuntu6.3 amd64 [upgradable from: 1:1.30.1-4ubuntu6]
ca-certificates/focal-updates,focal-security 20210119~20.04.2 all [upgradable from: 20190110ubuntu1]
cloud-init/focal-updates 21.3-1-g6803368d-0ubuntu1~20.04.3 all [upgradable from: 20.1-10-g71af48df-0ubuntu5]
command-not-found/focal-updates 20.04.4 all [upgradable from: 20.04.2]
cpio/focal-updates,focal-security 2.13+dfsg-2ubuntu0.3 amd64 [upgradable from: 2.13+dfsg-2]
cryptsetup-bin/focal-updates 2:2.2.2-3ubuntu2.3 amd64 [upgradable from: 2:2.2.2-3ubuntu2]
cryptsetup-initramfs/focal-updates 2:2.2.2-3ubuntu2.3 all [upgradable from: 2:2.2.2-3ubuntu2]
cryptsetup-run/focal-updates 2:2.2.2-3ubuntu2.3 all [upgradable from: 2:2.2.2-3ubuntu2]
cryptsetup/focal-updates 2:2.2.2-3ubuntu2.3 amd64 [upgradable from: 2:2.2.2-3ubuntu2]
curl/focal-updates,focal-security 7.68.0-1ubuntu2.7 amd64 [upgradable from: 7.68.0-1ubuntu2]
dbus-user-session/focal-updates,focal-security 1.12.16-2ubuntu2.1 amd64 [upgradable from: 1.12.16-2ubuntu2]
dbus-x11/focal-updates,focal-security 1.12.16-2ubuntu2.1 amd64 [upgradable from: 1.12.16-2ubuntu2]
dbus/focal-updates,focal-security 1.12.16-2ubuntu2.1 amd64 [upgradable from: 1.12.16-2ubuntu2]
dirmngr/focal-updates 2.2.19-3ubuntu2.1 amd64 [upgradable from: 2.2.19-3ubuntu2]
distro-info-data/focal-updates,focal-security 0.43ubuntu1.6 all [upgradable from: 0.43ubuntu1]
fdisk/focal-updates 2.34-0.1ubuntu9.1 amd64 [upgradable from: 2.34-0.1ubuntu9]
finalrd/focal-updates 6~ubuntu20.04.1 all [upgradable from: 5]
friendly-recovery/focal-updates 0.2.41ubuntu0.20.04.1 all [upgradable from: 0.2.41]
fwupd-signed/focal-updates 1.27.1ubuntu5+1.5.11-0ubuntu1~20.04.2 amd64 [upgradable from: 1.27+1.3.9-4]
fwupd/focal-updates 1.5.11-0ubuntu1~20.04.2 amd64 [upgradable from: 1.3.9-4]
gcc-10-base/focal-updates,focal-security 10.3.0-1ubuntu1~20.04 amd64 [upgradable from: 10-20200411-0ubuntu1]
gir1.2-glib-2.0/focal-updates 1.64.1-1~ubuntu20.04.1 amd64 [upgradable from: 1.64.0-2]
gir1.2-packagekitglib-1.0/focal-updates,focal-security 1.1.13-2ubuntu1.1 amd64 [upgradable from: 1.1.13-2ubuntu1]
git-man/focal-updates,focal-security 1:2.25.1-1ubuntu3.2 all [upgradable from: 1:2.25.1-1ubuntu3]
git/focal-updates,focal-security 1:2.25.1-1ubuntu3.2 amd64 [upgradable from: 1:2.25.1-1ubuntu3]
glib-networking-common/focal-updates,focal-security 2.64.2-1ubuntu0.1 all [upgradable from: 2.64.1-1]
glib-networking-services/focal-updates,focal-security 2.64.2-1ubuntu0.1 amd64 [upgradable from: 2.64.1-1]
glib-networking/focal-updates,focal-security 2.64.2-1ubuntu0.1 amd64 [upgradable from: 2.64.1-1]
gnupg-l10n/focal-updates 2.2.19-3ubuntu2.1 all [upgradable from: 2.2.19-3ubuntu2]
gnupg-utils/focal-updates 2.2.19-3ubuntu2.1 amd64 [upgradable from: 2.2.19-3ubuntu2]
gnupg/focal-updates 2.2.19-3ubuntu2.1 all [upgradable from: 2.2.19-3ubuntu2]
gpg-agent/focal-updates 2.2.19-3ubuntu2.1 amd64 [upgradable from: 2.2.19-3ubuntu2]
gpg-wks-client/focal-updates 2.2.19-3ubuntu2.1 amd64 [upgradable from: 2.2.19-3ubuntu2]
gpg-wks-server/focal-updates 2.2.19-3ubuntu2.1 amd64 [upgradable from: 2.2.19-3ubuntu2]
gpg/focal-updates 2.2.19-3ubuntu2.1 amd64 [upgradable from: 2.2.19-3ubuntu2]
gpgconf/focal-updates 2.2.19-3ubuntu2.1 amd64 [upgradable from: 2.2.19-3ubuntu2]
gpgsm/focal-updates 2.2.19-3ubuntu2.1 amd64 [upgradable from: 2.2.19-3ubuntu2]
gpgv/focal-updates 2.2.19-3ubuntu2.1 amd64 [upgradable from: 2.2.19-3ubuntu2]
initramfs-tools-bin/focal-updates 0.136ubuntu6.6 amd64 [upgradable from: 0.136ubuntu6]
initramfs-tools-core/focal-updates 0.136ubuntu6.6 all [upgradable from: 0.136ubuntu6]
initramfs-tools/focal-updates 0.136ubuntu6.6 all [upgradable from: 0.136ubuntu6]
isc-dhcp-client/focal-updates,focal-security 4.4.1-2.1ubuntu5.20.04.2 amd64 [upgradable from: 4.4.1-2.1ubuntu5]
isc-dhcp-common/focal-updates,focal-security 4.4.1-2.1ubuntu5.20.04.2 amd64 [upgradable from: 4.4.1-2.1ubuntu5]
krb5-locales/focal-updates,focal-security 1.17-6ubuntu4.1 all [upgradable from: 1.17-6ubuntu4]
landscape-common/focal-updates 19.12-0ubuntu4.2 amd64 [upgradable from: 19.12-0ubuntu4]
language-selector-common/focal-updates 0.204.2 all [upgradable from: 0.204]
less/focal-updates 551-1ubuntu0.1 amd64 [upgradable from: 551-1]
libaccountsservice0/focal-updates,focal-security 0.6.55-0ubuntu12~20.04.4 amd64 [upgradable from: 0.6.55-0ubuntu11]
libapparmor1/focal-updates 2.13.3-7ubuntu5.1 amd64 [upgradable from: 2.13.3-7ubuntu5]
libapt-pkg6.0/focal-updates 2.0.6 amd64 [upgradable from: 2.0.2]
libasound2-data/focal-updates 1.2.2-2.1ubuntu2.4 all [upgradable from: 1.2.2-2.1]
libasound2/focal-updates 1.2.2-2.1ubuntu2.4 amd64 [upgradable from: 1.2.2-2.1]
libblkid1/focal-updates 2.34-0.1ubuntu9.1 amd64 [upgradable from: 2.34-0.1ubuntu9]
libbrotli1/focal-updates,focal-security 1.0.7-6ubuntu0.1 amd64 [upgradable from: 1.0.7-6build1]
libc-bin/focal-updates 2.31-0ubuntu9.2 amd64 [upgradable from: 2.31-0ubuntu9]
libc6/focal-updates 2.31-0ubuntu9.2 amd64 [upgradable from: 2.31-0ubuntu9]
libcryptsetup12/focal-updates 2:2.2.2-3ubuntu2.3 amd64 [upgradable from: 2:2.2.2-3ubuntu2]
libcurl3-gnutls/focal-updates,focal-security 7.68.0-1ubuntu2.7 amd64 [upgradable from: 7.68.0-1ubuntu2]
libcurl4/focal-updates,focal-security 7.68.0-1ubuntu2.7 amd64 [upgradable from: 7.68.0-1ubuntu2]
libdbus-1-3/focal-updates,focal-security 1.12.16-2ubuntu2.1 amd64 [upgradable from: 1.12.16-2ubuntu2]
libdns-export1109/focal-updates 1:9.11.16+dfsg-3~ubuntu1 amd64 [upgradable from: 1:9.11.16+dfsg-3~build1]
libdrm-amdgpu1/focal-updates 2.4.105-3~20.04.2 amd64 [upgradable from: 2.4.101-2]
libdrm-common/focal-updates 2.4.105-3~20.04.2 all [upgradable from: 2.4.101-2]
libdrm-intel1/focal-updates 2.4.105-3~20.04.2 amd64 [upgradable from: 2.4.101-2]
libdrm-nouveau2/focal-updates 2.4.105-3~20.04.2 amd64 [upgradable from: 2.4.101-2]
libdrm-radeon1/focal-updates 2.4.105-3~20.04.2 amd64 [upgradable from: 2.4.101-2]
libdrm2/focal-updates 2.4.105-3~20.04.2 amd64 [upgradable from: 2.4.101-2]
libefiboot1/focal-updates 37-2ubuntu2.2 amd64 [upgradable from: 37-2ubuntu2]
libefivar1/focal-updates 37-2ubuntu2.2 amd64 [upgradable from: 37-2ubuntu2]
libfdisk1/focal-updates 2.34-0.1ubuntu9.1 amd64 [upgradable from: 2.34-0.1ubuntu9]
libfreetype6/focal-updates,focal-security 2.10.1-2ubuntu0.1 amd64 [upgradable from: 2.10.1-2]
libfwupd2/focal-updates 1.5.11-0ubuntu1~20.04.2 amd64 [upgradable from: 1.3.9-4]
libfwupdplugin1/focal-updates 1.5.11-0ubuntu1~20.04.2 amd64 [upgradable from: 1.3.9-4]
libgcc-s1/focal-updates,focal-security 10.3.0-1ubuntu1~20.04 amd64 [upgradable from: 10-20200411-0ubuntu1]
libgcrypt20/focal-updates,focal-security 1.8.5-5ubuntu1.1 amd64 [upgradable from: 1.8.5-5ubuntu1]
libgirepository-1.0-1/focal-updates 1.64.1-1~ubuntu20.04.1 amd64 [upgradable from: 1.64.0-2]
libgl1-mesa-dri/focal-updates 21.0.3-0ubuntu0.3~20.04.2 amd64 [upgradable from: 20.0.4-2ubuntu1]
libgl1/focal-updates 1.3.2-1~ubuntu0.20.04.1 amd64 [upgradable from: 1.3.1-1]
libglapi-mesa/focal-updates 21.0.3-0ubuntu0.3~20.04.2 amd64 [upgradable from: 20.0.4-2ubuntu1]
libglib2.0-0/focal-updates 2.64.6-1~ubuntu20.04.4 amd64 [upgradable from: 2.64.2-1~fakesync1]
libglib2.0-bin/focal-updates 2.64.6-1~ubuntu20.04.4 amd64 [upgradable from: 2.64.2-1~fakesync1]
libglib2.0-data/focal-updates 2.64.6-1~ubuntu20.04.4 all [upgradable from: 2.64.2-1~fakesync1]
libglvnd0/focal-updates 1.3.2-1~ubuntu0.20.04.1 amd64 [upgradable from: 1.3.1-1]
libglx-mesa0/focal-updates 21.0.3-0ubuntu0.3~20.04.2 amd64 [upgradable from: 20.0.4-2ubuntu1]
libglx0/focal-updates 1.3.2-1~ubuntu0.20.04.1 amd64 [upgradable from: 1.3.1-1]
libgnutls30/focal-updates,focal-security 3.6.13-2ubuntu1.6 amd64 [upgradable from: 3.6.13-2ubuntu1]
libgssapi-krb5-2/focal-updates,focal-security 1.17-6ubuntu4.1 amd64 [upgradable from: 1.17-6ubuntu4]
libhogweed5/focal-updates,focal-security 3.5.1+really3.5.1-2ubuntu0.2 amd64 [upgradable from: 3.5.1+really3.5.1-2]
libisc-export1105/focal-updates 1:9.11.16+dfsg-3~ubuntu1 amd64 [upgradable from: 1:9.11.16+dfsg-3~build1]
libjson-c4/focal-updates,focal-security 0.13.1+dfsg-7ubuntu0.3 amd64 [upgradable from: 0.13.1+dfsg-7]
libk5crypto3/focal-updates,focal-security 1.17-6ubuntu4.1 amd64 [upgradable from: 1.17-6ubuntu4]
libkrb5-3/focal-updates,focal-security 1.17-6ubuntu4.1 amd64 [upgradable from: 1.17-6ubuntu4]
libkrb5support0/focal-updates,focal-security 1.17-6ubuntu4.1 amd64 [upgradable from: 1.17-6ubuntu4]
libldap-2.4-2/focal-updates 2.4.49+dfsg-2ubuntu1.8 amd64 [upgradable from: 2.4.49+dfsg-2ubuntu1]
libldap-common/focal-updates 2.4.49+dfsg-2ubuntu1.8 all [upgradable from: 2.4.49+dfsg-2ubuntu1]
liblz4-1/focal-updates,focal-security 1.9.2-2ubuntu0.20.04.1 amd64 [upgradable from: 1.9.2-2]
liblzma5/focal-updates 5.2.4-1ubuntu1 amd64 [upgradable from: 5.2.4-1]
libmaxminddb0/focal-updates,focal-security 1.4.2-0ubuntu1.20.04.1 amd64 [upgradable from: 1.4.2-0ubuntu1]
libmount1/focal-updates 2.34-0.1ubuntu9.1 amd64 [upgradable from: 2.34-0.1ubuntu9]
libnetplan0/focal-updates 0.103-0ubuntu5~20.04.1 amd64 [upgradable from: 0.99-0ubuntu1]
libnettle7/focal-updates,focal-security 3.5.1+really3.5.1-2ubuntu0.2 amd64 [upgradable from: 3.5.1+really3.5.1-2]
libnss-systemd/focal-updates 245.4-4ubuntu3.13 amd64 [upgradable from: 245.4-4ubuntu3]
libntfs-3g883/focal-updates,focal-security 1:2017.3.23AR.3-3ubuntu1.1 amd64 [upgradable from: 1:2017.3.23AR.3-3ubuntu1]
libp11-kit0/focal-updates,focal-security 0.23.20-1ubuntu0.1 amd64 [upgradable from: 0.23.20-1build1]
libpackagekit-glib2-18/focal-updates,focal-security 1.1.13-2ubuntu1.1 amd64 [upgradable from: 1.1.13-2ubuntu1]
libpam-modules-bin/focal-updates 1.3.1-5ubuntu4.2 amd64 [upgradable from: 1.3.1-5ubuntu4]
libpam-modules/focal-updates 1.3.1-5ubuntu4.2 amd64 [upgradable from: 1.3.1-5ubuntu4]
libpam-runtime/focal-updates 1.3.1-5ubuntu4.2 all [upgradable from: 1.3.1-5ubuntu4]
libpam-systemd/focal-updates 245.4-4ubuntu3.13 amd64 [upgradable from: 245.4-4ubuntu3]
libpam0g/focal-updates 1.3.1-5ubuntu4.2 amd64 [upgradable from: 1.3.1-5ubuntu4]
libparted2/focal-updates 3.3-4ubuntu0.20.04.1 amd64 [upgradable from: 3.3-4]
libpci3/focal-updates 1:3.6.4-1ubuntu0.20.04.1 amd64 [upgradable from: 1:3.6.4-1]
libperl5.30/focal-updates,focal-security 5.30.0-9ubuntu0.2 amd64 [upgradable from: 5.30.0-9build1]
libplymouth5/focal-updates 0.9.4git20200323-0ubuntu6.2 amd64 [upgradable from: 0.9.4git20200323-0ubuntu6]
libpolkit-agent-1-0/focal-updates,focal-security 0.105-26ubuntu1.1 amd64 [upgradable from: 0.105-26ubuntu1]
libpolkit-gobject-1-0/focal-updates,focal-security 0.105-26ubuntu1.1 amd64 [upgradable from: 0.105-26ubuntu1]
libprocps8/focal-updates 2:3.3.16-1ubuntu2.3 amd64 [upgradable from: 2:3.3.16-1ubuntu2]
libproxy1v5/focal-updates,focal-security 0.4.15-10ubuntu1.2 amd64 [upgradable from: 0.4.15-10]
libpulse0/focal-updates 1:13.99.1-1ubuntu3.11 amd64 [upgradable from: 1:13.99.1-1ubuntu3]
libpulsedsp/focal-updates 1:13.99.1-1ubuntu3.11 amd64 [upgradable from: 1:13.99.1-1ubuntu3]
libpython3.8-minimal/focal-updates,focal-security 3.8.10-0ubuntu1~20.04.1 amd64 [upgradable from: 3.8.2-1ubuntu1]
libpython3.8-stdlib/focal-updates,focal-security 3.8.10-0ubuntu1~20.04.1 amd64 [upgradable from: 3.8.2-1ubuntu1]
libpython3.8/focal-updates,focal-security 3.8.10-0ubuntu1~20.04.1 amd64 [upgradable from: 3.8.2-1ubuntu1]
libseccomp2/focal-updates 2.5.1-1ubuntu1~20.04.1 amd64 [upgradable from: 2.4.3-1ubuntu1]
libsmartcols1/focal-updates 2.34-0.1ubuntu9.1 amd64 [upgradable from: 2.34-0.1ubuntu9]
libsndfile1/focal-updates,focal-security 1.0.28-7ubuntu0.1 amd64 [upgradable from: 1.0.28-7]
libsqlite3-0/focal-updates,focal-security 3.31.1-4ubuntu0.2 amd64 [upgradable from: 3.31.1-4]
libssh-4/focal-updates,focal-security 0.9.3-2ubuntu2.2 amd64 [upgradable from: 0.9.3-2ubuntu2]
libssl1.1/focal-updates,focal-security 1.1.1f-1ubuntu2.8 amd64 [upgradable from: 1.1.1f-1ubuntu2]
libstdc++6/focal-updates,focal-security 10.3.0-1ubuntu1~20.04 amd64 [upgradable from: 10-20200411-0ubuntu1]
libsystemd0/focal-updates 245.4-4ubuntu3.13 amd64 [upgradable from: 245.4-4ubuntu3]
libudev1/focal-updates 245.4-4ubuntu3.13 amd64 [upgradable from: 245.4-4ubuntu3]
libuuid1/focal-updates 2.34-0.1ubuntu9.1 amd64 [upgradable from: 2.34-0.1ubuntu9]
libuv1/focal-updates,focal-security 1.34.2-1ubuntu1.3 amd64 [upgradable from: 1.34.2-1ubuntu1]
libx11-6/focal-updates,focal-security 2:1.6.9-2ubuntu1.2 amd64 [upgradable from: 2:1.6.9-2ubuntu1]
libx11-data/focal-updates,focal-security 2:1.6.9-2ubuntu1.2 all [upgradable from: 2:1.6.9-2ubuntu1]
libx11-xcb1/focal-updates,focal-security 2:1.6.9-2ubuntu1.2 amd64 [upgradable from: 2:1.6.9-2ubuntu1]
libxml2/focal-updates,focal-security 2.9.10+dfsg-5ubuntu0.20.04.1 amd64 [upgradable from: 2.9.10+dfsg-5]
libxmlb1/focal-updates 0.1.15-2ubuntu1~20.04.1 amd64 [upgradable from: 0.1.15-2]
libzstd1/focal-updates,focal-security 1.4.4+dfsg-3ubuntu0.1 amd64 [upgradable from: 1.4.4+dfsg-3]
linux-base/focal-updates 4.5ubuntu3.6 all [upgradable from: 4.5ubuntu3]
locales/focal-updates 2.31-0ubuntu9.2 all [upgradable from: 2.31-0ubuntu9]
login/focal-updates 1:4.8.1-1ubuntu5.20.04.1 amd64 [upgradable from: 1:4.8.1-1ubuntu5]
lshw/focal-updates 02.18.85-0.3ubuntu2.20.04.1 amd64 [upgradable from: 02.18.85-0.3ubuntu2]
lsof/focal-updates 4.93.2+dfsg-1ubuntu0.20.04.1 amd64 [upgradable from: 4.93.2+dfsg-1]
lz4/focal-updates,focal-security 1.9.2-2ubuntu0.20.04.1 amd64 [upgradable from: 1.9.2-2]
mdadm/focal-updates 4.1-5ubuntu1.2 amd64 [upgradable from: 4.1-5ubuntu1]
mesa-vulkan-drivers/focal-updates 21.0.3-0ubuntu0.3~20.04.2 amd64 [upgradable from: 20.0.4-2ubuntu1]
mount/focal-updates 2.34-0.1ubuntu9.1 amd64 [upgradable from: 2.34-0.1ubuntu9]
netplan.io/focal-updates 0.103-0ubuntu5~20.04.1 amd64 [upgradable from: 0.99-0ubuntu1]
networkd-dispatcher/focal-updates 2.1-2~ubuntu20.04.1 all [upgradable from: 2.0.1-1]
ntfs-3g/focal-updates,focal-security 1:2017.3.23AR.3-3ubuntu1.1 amd64 [upgradable from: 1:2017.3.23AR.3-3ubuntu1]
open-iscsi/focal-updates 2.0.874-7.1ubuntu6.2 amd64 [upgradable from: 2.0.874-7.1ubuntu6]
open-vm-tools/focal-updates 2:11.3.0-2ubuntu0~ubuntu20.04.1 amd64 [upgradable from: 2:11.0.5-4]
openssh-client/focal-updates 1:8.2p1-4ubuntu0.3 amd64 [upgradable from: 1:8.2p1-4]
openssh-server/focal-updates 1:8.2p1-4ubuntu0.3 amd64 [upgradable from: 1:8.2p1-4]
openssh-sftp-server/focal-updates 1:8.2p1-4ubuntu0.3 amd64 [upgradable from: 1:8.2p1-4]
openssl/focal-updates,focal-security 1.1.1f-1ubuntu2.8 amd64 [upgradable from: 1.1.1f-1ubuntu2]
packagekit-tools/focal-updates,focal-security 1.1.13-2ubuntu1.1 amd64 [upgradable from: 1.1.13-2ubuntu1]
packagekit/focal-updates,focal-security 1.1.13-2ubuntu1.1 amd64 [upgradable from: 1.1.13-2ubuntu1]
parted/focal-updates 3.3-4ubuntu0.20.04.1 amd64 [upgradable from: 3.3-4]
passwd/focal-updates 1:4.8.1-1ubuntu5.20.04.1 amd64 [upgradable from: 1:4.8.1-1ubuntu5]
pciutils/focal-updates 1:3.6.4-1ubuntu0.20.04.1 amd64 [upgradable from: 1:3.6.4-1]
perl-base/focal-updates,focal-security 5.30.0-9ubuntu0.2 amd64 [upgradable from: 5.30.0-9build1]
perl-modules-5.30/focal-updates,focal-security 5.30.0-9ubuntu0.2 all [upgradable from: 5.30.0-9build1]
perl/focal-updates,focal-security 5.30.0-9ubuntu0.2 amd64 [upgradable from: 5.30.0-9build1]
plymouth-theme-ubuntu-text/focal-updates 0.9.4git20200323-0ubuntu6.2 amd64 [upgradable from: 0.9.4git20200323-0ubuntu6]
plymouth/focal-updates 0.9.4git20200323-0ubuntu6.2 amd64 [upgradable from: 0.9.4git20200323-0ubuntu6]
policykit-1/focal-updates,focal-security 0.105-26ubuntu1.1 amd64 [upgradable from: 0.105-26ubuntu1]
pollinate/focal-updates 4.33-3ubuntu1.20.04.1 all [upgradable from: 4.33-3ubuntu1]
procps/focal-updates 2:3.3.16-1ubuntu2.3 amd64 [upgradable from: 2:3.3.16-1ubuntu2]
pulseaudio-utils/focal-updates 1:13.99.1-1ubuntu3.11 amd64 [upgradable from: 1:13.99.1-1ubuntu3]
python-apt-common/focal-updates 2.0.0ubuntu0.20.04.6 all [upgradable from: 2.0.0]
python3-apport/focal-updates,focal-security 2.20.11-0ubuntu27.20 all [upgradable from: 2.20.11-0ubuntu27]
python3-apt/focal-updates 2.0.0ubuntu0.20.04.6 amd64 [upgradable from: 2.0.0]
python3-commandnotfound/focal-updates 20.04.4 all [upgradable from: 20.04.2]
python3-cryptography/focal-updates,focal-security 2.8-3ubuntu0.1 amd64 [upgradable from: 2.8-3]
python3-distupgrade/focal-updates 1:20.04.36 all [upgradable from: 1:20.04.18]
python3-distutils/focal-updates,focal-security 3.8.10-0ubuntu1~20.04 all [upgradable from: 3.8.2-1ubuntu1]
python3-gdbm/focal-updates,focal-security 3.8.10-0ubuntu1~20.04 amd64 [upgradable from: 3.8.2-1ubuntu1]
python3-lib2to3/focal-updates,focal-security 3.8.10-0ubuntu1~20.04 all [upgradable from: 3.8.2-1ubuntu1]
python3-problem-report/focal-updates,focal-security 2.20.11-0ubuntu27.20 all [upgradable from: 2.20.11-0ubuntu27]
python3-requests/focal 2.22.0-2ubuntu1 all [upgradable from: 2.22.0-2build1]
python3-software-properties/focal-updates 0.98.9.5 all [upgradable from: 0.98.9]
python3-twisted-bin/focal-updates 18.9.0-11ubuntu0.20.04.1 amd64 [upgradable from: 18.9.0-11]
python3-twisted/focal-updates 18.9.0-11ubuntu0.20.04.1 all [upgradable from: 18.9.0-11]
python3-update-manager/focal-updates 1:20.04.10.9 all [upgradable from: 1:20.04.9]
python3-urllib3/focal-updates,focal-security 1.25.8-2ubuntu0.1 all [upgradable from: 1.25.8-2]
python3-yaml/focal-updates,focal-security 5.3.1-1ubuntu0.1 amd64 [upgradable from: 5.3.1-1]
python3.8-minimal/focal-updates,focal-security 3.8.10-0ubuntu1~20.04.1 amd64 [upgradable from: 3.8.2-1ubuntu1]
python3.8/focal-updates,focal-security 3.8.10-0ubuntu1~20.04.1 amd64 [upgradable from: 3.8.2-1ubuntu1]
rsyslog/focal-updates 8.2001.0-1ubuntu1.1 amd64 [upgradable from: 8.2001.0-1ubuntu1]
screen/focal-updates,focal-security 4.8.0-1ubuntu0.1 amd64 [upgradable from: 4.8.0-1]
show-motd/focal-updates 3.6-0ubuntu6.1 all [upgradable from: 3.6-0ubuntu6]
snapd/focal-updates 2.51.1+20.04ubuntu2 amd64 [upgradable from: 2.44.3+20.04]
software-properties-common/focal-updates 0.98.9.5 all [upgradable from: 0.98.9]
sosreport/focal-updates 4.1-1ubuntu0.20.04.3 amd64 [upgradable from: 3.9-1ubuntu2]
squashfs-tools/focal-updates,focal-security 1:4.4-1ubuntu0.2 amd64 [upgradable from: 1:4.4-1]
strace/focal-updates 5.5-3ubuntu1 amd64 [upgradable from: 4.26-0.2ubuntu3]
sudo/focal-updates,focal-security 1.8.31-1ubuntu1.2 amd64 [upgradable from: 1.8.31-1ubuntu1]
systemd-sysv/focal-updates 245.4-4ubuntu3.13 amd64 [upgradable from: 245.4-4ubuntu3]
systemd-timesyncd/focal-updates 245.4-4ubuntu3.13 amd64 [upgradable from: 245.4-4ubuntu3]
systemd/focal-updates 245.4-4ubuntu3.13 amd64 [upgradable from: 245.4-4ubuntu3]
tar/focal-updates,focal-security 1.30+dfsg-7ubuntu0.20.04.1 amd64 [upgradable from: 1.30+dfsg-7]
tmux/focal-updates 3.0a-2ubuntu0.3 amd64 [upgradable from: 3.0a-2]
tzdata/focal-updates,focal-security 2021a-0ubuntu0.20.04 all [upgradable from: 2019c-3ubuntu1]
ubuntu-advantage-tools/focal-updates 27.2.2~20.04.1 amd64 [upgradable from: 20.3]
ubuntu-keyring/focal-updates 2020.02.11.4 all [upgradable from: 2020.02.11.2]
ubuntu-minimal/focal-updates 1.450.2 amd64 [upgradable from: 1.450]
ubuntu-release-upgrader-core/focal-updates 1:20.04.36 all [upgradable from: 1:20.04.18]
ubuntu-server/focal-updates 1.450.2 amd64 [upgradable from: 1.450]
ubuntu-standard/focal-updates 1.450.2 amd64 [upgradable from: 1.450]
ubuntu-wsl/focal-updates 1.450.2 amd64 [upgradable from: 1.450]
udev/focal-updates 245.4-4ubuntu3.13 amd64 [upgradable from: 245.4-4ubuntu3]
unattended-upgrades/focal-updates 2.3ubuntu0.1 all [upgradable from: 2.3]
update-manager-core/focal-updates 1:20.04.10.9 all [upgradable from: 1:20.04.9]
update-motd/focal-updates 3.6-0ubuntu6.1 all [upgradable from: 3.6-0ubuntu6]
update-notifier-common/focal-updates 3.192.30.9 all [upgradable from: 3.192.30]
util-linux/focal-updates 2.34-0.1ubuntu9.1 amd64 [upgradable from: 2.34-0.1ubuntu9]
uuid-runtime/focal-updates 2.34-0.1ubuntu9.1 amd64 [upgradable from: 2.34-0.1ubuntu9]
vim-common/focal-updates,focal-security 2:8.1.2269-1ubuntu5.3 all [upgradable from: 2:8.1.2269-1ubuntu5]
vim-runtime/focal-updates,focal-security 2:8.1.2269-1ubuntu5.3 all [upgradable from: 2:8.1.2269-1ubuntu5]
vim-tiny/focal-updates,focal-security 2:8.1.2269-1ubuntu5.3 amd64 [upgradable from: 2:8.1.2269-1ubuntu5]
vim/focal-updates,focal-security 2:8.1.2269-1ubuntu5.3 amd64 [upgradable from: 2:8.1.2269-1ubuntu5]
wslu/focal-updates 2.3.6-0ubuntu2~20.04.0 all [upgradable from: 2.3.6-0ubuntu1]
xxd/focal-updates,focal-security 2:8.1.2269-1ubuntu5.3 amd64 [upgradable from: 2:8.1.2269-1ubuntu5]
xz-utils/focal-updates 5.2.4-1ubuntu1 amd64 [upgradable from: 5.2.4-1]
zlib1g/focal-updates 1:1.2.11.dfsg-2ubuntu1.2 amd64 [upgradable from: 1:1.2.11.dfsg-2ubuntu1]

 

 

Linux les gestionnaires de paquets : exemple de gestionnaires de paquets

 

yum, dnf, dpkg, apt...

 

Sous linux Debian Ubuntu, on utilise par exemple dpkg ou APT

 

On va regarder dpkg qui veut dire debian packager, il a besoin de très peu de choses. Il sert à installer, configurer les paquets localement.

Options: -i -r --unpack -x etc.

Si le gestionnaire ne trouve pas le paquet en local il va le chercher sur le depot sur le lien internet. Exemple, docker utilise ses propres depots.

 

Pour supprimer un paquet avec apt: apt remove net-tools

le paquet est supprimé de l'ordinateur. MAIS! Il ne supprime pas tous les paquets, les fichiers de configuration vont rester, les logs vont rester. Si on le réinstalle, on va le retrouver dans le même état qu'il était avant installation.

 

 

https://dl.grafana.com/entreprise/release/grafana-entreprise_8.12_amd64.deb

On va télécharger un fichier à distance: .deb qui est un fichier pour Debian, fourni par grafana, outil qui permet de monitorer, surveiller, des machines.

Ensuite on l'installe avec dpkg

Ensuite on vérifie que le paquet grafana est bien installé en tapant la commande:

dpkg-l | grep grafana

Un pipe | permet d'executer une commande sur le résultat d'une autre commande

 

wget permet d'aller télécharger un fichier sur internet grace à un lien

 

wget https://dl.grafana.com/entreprise/release/grafana-enterprise_8.1.2_amd64.deb

 

 

sudo wget https://dl.grafana.com/enterprise/release/grafana-enterprise_8.1.2_amd64.deb
[sudo] password for ubuntu:
--2021-10-05 14:10:30-- https://dl.grafana.com/enterprise/release/grafana-enterprise_8.1.2_amd64.deb
Resolving dl.grafana.com (dl.grafana.com)... 151.101.122.217, 2a04:4e42:1d::729
Connecting to dl.grafana.com (dl.grafana.com)|151.101.122.217|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 60658426 (58M) [application/vnd.debian.binary-package]
Saving to: ‘grafana-enterprise_8.1.2_amd64.deb’

grafana-enterprise_8.1.2_amd6 100%[=================================================>] 57.85M 1.37MB/s in 38s

2021-10-05 14:11:09 (1.51 MB/s) - ‘grafana-enterprise_8.1.2_amd64.deb’ saved [60658426/60658426]

 

sudo dpkg -i grafana-enterprise_8.1.2_amd64.deb

Selecting previously unselected package grafana-enterprise.
(Reading database ... 31836 files and directories currently installed.)
Preparing to unpack grafana-enterprise_8.1.2_amd64.deb ...
Unpacking grafana-enterprise (8.1.2) ...
Setting up grafana-enterprise (8.1.2) ...
Adding system user `grafana' (UID 112) ...
Adding new user `grafana' (UID 112) with group `grafana' ...
Not creating home directory `/usr/share/grafana'.
### NOT starting on installation, please execute the following statements to configure grafana to start automatically using systemd
sudo /bin/systemctl daemon-reload
sudo /bin/systemctl enable grafana-server
### You can start grafana-server by executing
sudo /bin/systemctl start grafana-server
Processing triggers for systemd (245.4-4ubuntu3) ...

 

Vérification de l'installation:

 

sudo dpkg -l | grep grafana
ii grafana-enterprise 8.1.2 amd64 Grafana

 

Désinstallation:

sudo dpkg -r grafana

 

sudo dpkg -r grafana-enterprise
(Reading database ... 37210 files and directories currently installed.)
Removing grafana-enterprise (8.1.2) ...

 

ou apt remove grafana-enterprise

 

Il a bien désinstallé le paquet, mais...

Si on vérife les groupes

cat /etc/group

grafana:x:119:

L'installation a laissé une trace: le groupe grafana

Consultingit suite fleche 299

 

  

Une question? Posez-la ici

Linux les gestionnaires de paquets: les dépendances

 

dpkg ne gère pas les dépendances. Pour gérer les dépendances, on utilise APT (en plus il va sur internet)

APT Advance packaging tool, qui se passe sur dpkg

 

Pour mettre à jour, on fait un apt update (mise à jour de la base de donnée), puis un apt upgrade

apt upgrade liste les paquets localement

apt update va chercher sur internet

apt et apt-get c'est la même chose.

 

Pour voir la liste des paquets qu'il est possible d'installer:

sudo apt install TAB TAB

Display all 76798 possibilities? (y or n)

 

apt search

apt show

Une question? Posez-la ici

Linux les gestionnaires de paquets: installation d'un paquet type

sudo apt update

sudo apt upgrade

sudo apt show tree

sudo apt install tree

 

  

Une question? Posez-la ici

 

 

 

 

Linux les gestionnaires de paquets : les sources installation manuelle

 

 Compiler soit meme un logiciel permet d'inclure les fichiers que l'on veut

 

dans le repretoire usr

on crée un dossier tree-latest

mkdir tree-latest

On télécharges avec wget le .tar.gz

on décompresse l'archive qui contient les fichiers 

sudo tar zxvf tree-1.8.tgz

dans le paquet, on voit readme, install et makefile.

 

sudo apt install make gcc 

 

Ce transcript reflète exclusivement l'opinion de ses auteurs et n’engage en aucune façon Consultingit

 

Besoin d'aides avec Linux??