diff --git a/docs/APT/apt_keys.md b/docs/APT/apt_keys.md new file mode 100644 index 0000000..d95d449 --- /dev/null +++ b/docs/APT/apt_keys.md @@ -0,0 +1,29 @@ +categories: apt +title: Gestion des clés apt + +#### Clé publique non disponible / reconnue #### + +Lors de l'utilisation d'*apt*, il arrive d'obtenir l'erreur suivante: + +``` +W: GPG error: Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY +``` + +Cela signifie que la signature du dépôt n'a pas pû être vérifiée localement. +Il faut donc ajouter la clé publique du dépôt. + +##### Ajout via //apt-key// ##### + +``` +root@test01:~ # apt-key adv --keyserver keyserver.ubuntu.com --recv-keys +``` + +##### Méthode alternative ##### + +Il est également possible de réaliser l'ajout de la clé publique via *gpg* : + +``` +root@test01:~ # gpg --keyserver pgpkeys.mit.edu --recv-key +root@test01:~ # gpg -a --export | apt-key add - +root@test01:~ # apt update +``` diff --git a/docs/APT/package_upgrade.md b/docs/APT/package_upgrade.md new file mode 100644 index 0000000..4d7fe19 --- /dev/null +++ b/docs/APT/package_upgrade.md @@ -0,0 +1,56 @@ +categories: apt +title: Connaître la liste des packages à upgrader + +``` +apt-get --just-print upgrade | grep -i security | awk '{print $2}' | awk '!seen[$0]++' +``` + +Exemple: + +``` +root@test01:~ # apt --just-print upgrade | grep -i security | awk '{print $2}' | awk '!seen[$0]++' +mariadb-common +libmariadb3 +mariadb-client-core-10.5 +mariadb-client-10.5 +mariadb-client +``` + +Il suffira donc de mettre à jour ces paquets unitairement. + + +``` +root@test01:~ # apt install mariadb-common libmariadb3 mariadb-client-core-10.5 mariadb-client-10.5 mariadb-client +Reading package lists... Done +Building dependency tree... Done +Reading state information... Done +The following packages will be upgraded: + libmariadb3 mariadb-client mariadb-client-10.5 mariadb-client-core-10.5 mariadb-common +5 upgraded, 0 newly installed, 0 to remove and 54 not upgraded. +Need to get 0 B/2,548 kB of archives. +After this operation, 10.2 kB of additional disk space will be used. +[master 04098ca] saving uncommitted changes in /etc prior to apt run + 1 file changed, 1 insertion(+), 1 deletion(-) +Reading changelogs... Done +apt-listchanges: Mailing root: apt-listchanges: news for test01 +(Reading database ... 71306 files and directories currently installed.) +Preparing to unpack .../mariadb-common_1%3a10.5.26-0+deb11u2_all.deb ... +Unpacking mariadb-common (1:10.5.26-0+deb11u2) over (1:10.5.21-0+deb11u1) ... +Preparing to unpack .../libmariadb3_1%3a10.5.26-0+deb11u2_amd64.deb ... +Unpacking libmariadb3:amd64 (1:10.5.26-0+deb11u2) over (1:10.5.21-0+deb11u1) ... +Preparing to unpack .../mariadb-client-core-10.5_1%3a10.5.26-0+deb11u2_amd64.deb ... +Unpacking mariadb-client-core-10.5 (1:10.5.26-0+deb11u2) over (1:10.5.21-0+deb11u1) ... +Preparing to unpack .../mariadb-client-10.5_1%3a10.5.26-0+deb11u2_amd64.deb ... +Unpacking mariadb-client-10.5 (1:10.5.26-0+deb11u2) over (1:10.5.21-0+deb11u1) ... +Preparing to unpack .../mariadb-client_1%3a10.5.26-0+deb11u2_all.deb ... +Unpacking mariadb-client (1:10.5.26-0+deb11u2) over (1:10.5.21-0+deb11u1) ... +Setting up mariadb-common (1:10.5.26-0+deb11u2) ... +Setting up libmariadb3:amd64 (1:10.5.26-0+deb11u2) ... +Setting up mariadb-client-core-10.5 (1:10.5.26-0+deb11u2) ... +Setting up mariadb-client-10.5 (1:10.5.26-0+deb11u2) ... +Setting up mariadb-client (1:10.5.26-0+deb11u2) ... +Processing triggers for man-db (2.9.4-2) ... +Processing triggers for libc-bin (2.31-13+deb11u10) ... +Scanning processes... +Scanning linux images... +```