User Tools

Site Tools


informatica:servidor_internet_2009_debian_10_part_4

Servidor web/dades

Actualització a Debian 10.12 "buster" - Part 4 - Agost de 2022

Completar la descripció de les tasques realitzades.

Debian 10.12 es va publicar el 26 de març de 2022. Debian 10.0 es va publicar inicialment el 6 de juliol de 2019.

Aquesta pàgina conté la quarta part de la descripció detallada del procés d'actualització a Debian 10.12 “buster”.

Instal·lació de ntop-ng

Instal·lo ntop-ng en substitució de ntop que no para de donar missatges d'error.

# more /var/log/apt/history.log
...
Start-Date: 2022-08-09  11:10:03
Commandline: /usr/sbin/synaptic
Requested-By: sermnadmin (1000)
Install: node-html5shiv:amd64 (3.7.3+dfsg-2, automatic), libjs-rickshaw:amd64 (1.5.1.dfsg-2, automatic), fonts-font-awesome:amd64 (5.0.10+really4.7.0~dfsg-1, automatic), libjs-jquery-tablesorter:amd64 (1:2.31.1+
dfsg1-1, automatic), lua-cjson:amd64 (2.1.0+dfsg-2.1, automatic), ntopng-doc:amd64 (3.8+dfsg1-2.1), fping:amd64 (4.2-1, automatic), fonts-glyphicons-halflings:amd64 (1.009~3.4.1+dfsg-1, automatic), fonts-roboto-
slab:amd64 (1.100263+20170512-1, automatic), libjs-d3:amd64 (3.5.17-2, automatic), sphinx-rtd-theme-common:amd64 (0.4.3+dfsg-1, automatic), redis-tools:amd64 (5:5.0.14-1+deb10u2, automatic), librrd8:amd64 (1.7.1
-2, automatic), sntop:amd64 (1.4.3-4+b2), liblua5.1-0:amd64 (5.1.5-8.1+b2, automatic), libjs-bootstrap:amd64 (3.4.1+dfsg-1, automatic), libjemalloc2:amd64 (5.1.0-3, automatic), fonts-lato:amd64 (2.0-2, automatic
), ntopng:amd64 (3.8+dfsg1-2.1), libmaxminddb0:amd64 (1.3.2-1+deb10u1, automatic), libndpi2.6:amd64 (2.6-3, automatic), libwireshark-data:amd64 (2.6.20-0+deb10u3, automatic), libjs-modernizr:amd64 (2.6.2+ds1-3, 
automatic), libjs-jquery-metadata:amd64 (12-1.1, automatic), redis-server:amd64 (5:5.0.14-1+deb10u2, automatic), ntopng-data:amd64 (3.8+dfsg1-2.1, automatic), libjs-jquery-form:amd64 (12-1.1, automatic)
Purge: ntop:amd64 (3:5.0.1+dfsg1-2.1), ntop-data:amd64 (3:5.0.1+dfsg1-2.1)
End-Date: 2022-08-09  11:11:08

L'aplicació és accessible a través de http://localhost:3000 :warn: només des del servidor.

Instal·lació de l'escriptori Mate

Instal·lo l'escriptori “Mate” perquè és més lleuger que Gnome i consumeix menys recursos:

# more /var/log/apt/history.log
...
Start-Date: 2022-08-09  13:45:57
Commandline: apt install mate-desktop-environment
Requested-By: sermnadmin (1000)
Install: mate-settings-daemon:amd64 (1.20.4-1, automatic), mate-utils-common:amd64 (1.20.2-3, automatic), libffmpegthumbnailer4v5:amd64 (2.1.1-0.2+b1, automatic), gtk2-engines:amd64 (1:2.20.2-5, automatic), ffmp
egthumbnailer:amd64 (2.1.1-0.2+b1, automatic), mate-polkit-common:amd64 (1.20.2-1, automatic), pluma-common:amd64 (1.20.4-1, automatic), gvfs-backends:amd64 (1.38.1-5, automatic), libmtp9:amd64 (1.1.16-2, automa
tic), mate-utils:amd64 (1.20.2-3, automatic), mate-desktop-environment:amd64 (1.20.0+5), libmate-slab0:amd64 (1.20.4-2, automatic), debian-mate-default-settings:amd64 (1.20.2-1, automatic), gir1.2-pluma-1.0:amd6
4 (1.20.4-1, automatic), caja-common:amd64 (1.20.3-1, automatic), mate-system-monitor:amd64 (1.20.2-1, automatic), atril:amd64 (1.20.3-1+deb10u1, automatic), engrampa-common:amd64 (1.20.2-1, automatic), libmarco
-private1:amd64 (1.20.3-1, automatic), python-mate-menu:amd64 (1.20.2-1, automatic), mate-applet-brisk-menu:amd64 (0.5.0-9, automatic), libxpresent1:amd64 (1.0.0-2+b10, automatic), libmate-desktop-2-17:amd64 (1.
20.4-2, automatic), libjs-mathjax:amd64 (2.7.4+dfsg-1, automatic), mate-system-monitor-common:amd64 (1.20.2-1, automatic), mate-session-manager:amd64 (1.20.2-1, automatic), eom:amd64 (1.20.2-2, automatic), mate-
panel:amd64 (1.20.5-1, automatic), libiw30:amd64 (30~pre9-13, automatic), mate-desktop-common:amd64 (1.20.4-2, automatic), libcdio-cdda2:amd64 (10.2+0.94+2-4, automatic), fonts-mathjax:amd64 (2.7.4+dfsg-1, autom
atic), mate-polkit:amd64 (1.20.2-1, automatic), librda0:amd64 (0.0.5-1, automatic), libmatekbd-common:amd64 (1.20.2-1, automatic), mate-control-center:amd64 (1.20.4-2, automatic), librda-common:amd64 (0.0.5-1, a
utomatic), mate-media-common:amd64 (1.20.2-1, automatic), mate-icon-theme-faenza:amd64 (1.20.0+dfsg1-2, automatic), mate-power-manager-common:amd64 (1.20.3-2, automatic), menu-xdg:amd64 (0.6, automatic), mate-ap
plets-common:amd64 (1.20.3-2, automatic), marco:amd64 (1.20.3-1, automatic), gtk2-engines-murrine:amd64 (0.98.2-2+deb10u1, automatic), mate-screensaver-common:amd64 (1.20.3-3, automatic), mate-desktop-environmen
t-core:amd64 (1.20.0+5, automatic), mate-media:amd64 (1.20.2-1, automatic), caja:amd64 (1.20.3-1+b1, automatic), mate-settings-daemon-common:amd64 (1.20.4-1, automatic), libcdio-paranoia2:amd64 (10.2+0.94+2-4, a
utomatic), mate-power-manager:amd64 (1.20.3-2, automatic), libmtp-runtime:amd64 (1.1.16-2, automatic), mate-icon-theme:amd64 (1.20.3-1, automatic), mate-desktop:amd64 (1.20.4-2, automatic), libmatemixer0:amd64 (
1.20.1-1, automatic), mate-terminal:amd64 (1.20.2-2, automatic), libmate-menu2:amd64 (1.20.2-1, automatic), gtk2-engines-pixbuf:amd64 (2.24.32-3, automatic), eom-common:amd64 (1.20.2-2, automatic), mate-notifica
tion-daemon:amd64 (1.20.2-1, automatic), libmateweather-common:amd64 (1.20.2-1+deb10u1, automatic), mate-themes:amd64 (3.22.18-1, automatic), atril-common:amd64 (1.20.3-1+deb10u1, automatic), libmateweather1:amd
64 (1.20.2-1+deb10u1, automatic), mate-menus:amd64 (1.20.2-1, automatic), libmate-panel-applet-4-1:amd64 (1.20.5-1, automatic), mate-user-guide:amd64 (1.20.2-1, automatic), libnfs12:amd64 (3.0.0-2, automatic), l
ibmatekbd4:amd64 (1.20.2-1, automatic), libatrilview3:amd64 (1.20.3-1+deb10u1, automatic), libpeas-1.0-python2loader:amd64 (1.22.0-4, automatic), mate-terminal-common:amd64 (1.20.2-2, automatic), pluma:amd64 (1.
20.4-1, automatic), engrampa:amd64 (1.20.2-1, automatic), libmate-window-settings1:amd64 (1.20.4-2, automatic), libmatemixer-common:amd64 (1.20.1-1, automatic), mate-panel-common:amd64 (1.20.5-1, automatic), lib
atrildocument3:amd64 (1.20.3-1+deb10u1, automatic), mate-notification-daemon-common:amd64 (1.20.2-1, automatic), mate-screensaver:amd64 (1.20.3-3, automatic), libcpufreq0:amd64 (008-1.1, automatic), libmtp-commo
n:amd64 (1.1.16-2, automatic), mate-backgrounds:amd64 (1.20.0-2, automatic), mate-calc:amd64 (1.20.3-1, automatic), libcaja-extension1:amd64 (1.20.3-1+b1, automatic), mate-control-center-common:amd64 (1.20.4-2, 
automatic), marco-common:amd64 (1.20.3-1, automatic), mate-calc-common:amd64 (1.20.3-1, automatic), libmatedict6:amd64 (1.20.2-3, automatic), mate-applets:amd64 (1.20.3-2, automatic)
End-Date: 2022-08-09  13:48:24

i canvio la selecció de l'escriptori amb la comand # update-alternatives –config x-session-manager.

Llavors, tanco la sessió actual i reinicio el servidor per aplicar els canvis.

Desinstal·lació de l'escriptori Gnome

Desinstal·lo l'escriptori “Gnome” perquè consumeix molts recursos, fins i tot en la seva configuració clàssica:

# more /var/log/apt/history.log
...
Start-Date: 2022-08-09  14:14:22
Commandline: /usr/sbin/synaptic
Requested-By: sermnadmin (1000)
Purge: gnome-color-manager:amd64 (3.30.0-2), gnome-flashback-common:amd64 (3.30.0-3), gnome-control-center-data:amd64 (1:3.30.3-2~deb10u1), gnome-power-manager:amd64 (3.30.0-2), gnome-contacts:amd64 (3.30.2-1), 
gnome-session:amd64 (3.30.1-2), gnome-applets-data:amd64 (3.30.0-3), libgnome2-bin:amd64 (2.32.1-5+b1), gnome-control-center:amd64 (1:3.30.3-2~deb10u1), gnome-chess:amd64 (1:3.30.1-1), gnome-dictionary:amd64 (3.
26.1-5), chrome-gnome-shell:amd64 (10.1-5), gnome-mime-data:amd64 (2.18.0-2), gnome-games:amd64 (1:3.30+1), gnome-klotski:amd64 (1:3.22.3-3), gnome-icon-theme:amd64 (3.12.0-3), gnome-packagekit:amd64 (3.30.0-1),
 gnome-orca:amd64 (3.30.1-1), gnome-mahjongg:amd64 (1:3.22.0-4), gnome-screenshot:amd64 (3.30.0-2), gnome-packagekit-data:amd64 (3.30.0-1), gnome-panel-data:amd64 (3.30.0-2), gnome-online-miners:amd64 (3.30.0-2)
, gdebi:amd64 (0.9.5.7+nmu3), gnome-disk-utility:amd64 (3.30.2-3), gnome-font-viewer:amd64 (3.30.0-2), gnome-calculator:amd64 (3.30.1-2), alacarte:amd64 (3.11.91-4), libgnome2-0:amd64 (2.32.1-5+b1), gnome-panel:
amd64 (3.30.0-2), gnome-icon-theme-extras:amd64 (3.12.0-1), libgnome-2-0:amd64 (2.32.1-5+b1), gnome-online-accounts:amd64 (3.30.1-2), gnome-nettool:amd64 (3.8.1-3), gnome-screensaver:amd64 (3.6.1-10), gnome-appl
ets:amd64 (3.30.0-3), gnome-nibbles:amd64 (1:3.24.1-2), libgnomevfs2-common:amd64 (1:2.24.4-6.1), gnome-flashback:amd64 (3.30.0-3), gnome-mines:amd64 (1:3.30.1.1-2), libgnomevfs2-0:amd64 (1:2.24.4-6.1+b2), gnome
-documents:amd64 (3.31.92-1), gnome-session-flashback:amd64 (3.30.0-3), gnome-robots:amd64 (1:3.22.3-3), libgnomevfs2-extra:amd64 (1:2.24.4-6.1+b2), gnome-menus:amd64 (3.31.4-3)
End-Date: 2022-08-09  14:15:08

Start-Date: 2022-08-09  14:24:57
Commandline: /usr/sbin/synaptic
Requested-By: sermnadmin (1000)
Remove: libfolks-eds25:amd64 (0.11.4-1+b2), seahorse:amd64 (3.30.1.1-1), cheese:amd64 (3.31.90-1), evolution-plugin-bogofilter:amd64 (3.30.5-1.1), nautilus:amd64 (3.30.5-2), evolution-plugin-pstimport:amd64 (3.3
0.5-1.1), evolution-plugins:amd64 (3.30.5-1.1), libevolution:amd64 (3.30.5-1.1), evolution:amd64 (3.30.5-1.1)
Purge: gnome-system-monitor:amd64 (3.30.0-2), gnome-sudoku:amd64 (1:3.30.0-2), gnome-software:amd64 (3.30.6-5), gnome-sushi:amd64 (3.30.0-2), gnome-taquin:amd64 (3.30.0-2), gnome-system-log:amd64 (3.9.90-8), gno
me-software-common:amd64 (3.30.6-5)
End-Date: 2022-08-09  14:25:13

Start-Date: 2022-08-09  14:25:50
Commandline: /usr/sbin/synaptic
Requested-By: sermnadmin (1000)
Purge: gnome-tweak-tool:amd64 (3.30.2-1), gnome-tetravex:amd64 (1:3.22.0-3)
End-Date: 2022-08-09  14:25:53

Start-Date: 2022-08-09  14:26:12
Commandline: /usr/sbin/synaptic
Requested-By: sermnadmin (1000)
Purge: gnome-video-effects:amd64 (0.4.3-3), gnome-tweaks:amd64 (3.30.2-1), gnome-user-share:amd64 (3.28.0-2)
End-Date: 2022-08-09  14:26:15
...

Desinstal·lació de programari sense ús

Desinstal·lo els programes que no tenen sentit i no es fan servir en un servidor: gimp, inkscape, libreoffice, etc.

Després, des de synaptic desinstal·lo tots els paquets òrfens (la majoria són llibreries que ja no fa servir cap programa) i finalment executo apt autoremove:

# more /var/log/apt/history.log
...
Start-Date: 2022-08-09  14:27:10
Commandline: /usr/sbin/synaptic
Requested-By: sermnadmin (1000)
Purge: libgoa-backend-1.0-1:amd64 (3.30.1-2), gir1.2-gdata-0.0:amd64 (0.17.9-3) ...
End-Date: 2022-08-09  14:27:25

Start-Date: 2022-08-09  14:27:40
Commandline: /usr/sbin/synaptic
Requested-By: sermnadmin (1000)
Purge: libzapojit-0.0-0:amd64 (0.0.3-5), gir1.2-rest-0.7:amd64 (0.8.1-1), ...
End-Date: 2022-08-09  14:27:48

Start-Date: 2022-08-09  14:28:49
Commandline: apt autoremove
Requested-By: sermnadmin (1000)
Remove: libmono-system-numerics4.0-cil:amd64 (5.18.0.240+dfsg-3), ...
End-Date: 2022-08-09  14:30:47

Actualitzacions automàtiques

Els paquets unattended-upgrades i apt-listchanges ja estan instal·lats però cal configurar-los i activar-los.

Activo la descàrrega automàtica de paquets

# dpkg-reconfigure -plow unattended-upgrades

(respondre [YES])

Creating config file /etc/apt/apt.conf.d/20auto-upgrades with new version

# cat 20auto-upgrades 
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Unattended-Upgrade "1";

Configuració d'unattended-upgrades:

nano -c /etc/apt/apt.conf.d/50unattended-upgrades
⋮
// Send email to this address for problems or packages upgrades
// If empty or unset then no email is sent, make sure that you
// have a working mail setup on your system. A package that provides
// 'mailx' must be installed. E.g. "user@example.com"
Unattended-Upgrade::Mail "root";
⋮
// Automatically reboot *WITHOUT CONFIRMATION* if
// the file /var/run/reboot-required is found after the upgrade
Unattended-Upgrade::Automatic-Reboot "false";
⋮
// Enable logging to syslog. Default is False
Unattended-Upgrade::SyslogEnable "true";

// Specify syslog facility. Default is daemon
Unattended-Upgrade::SyslogFacility "daemon";
⋮

Configuració d'apt-listchanges:

# nano -c /etc/apt/listchanges.conf
[apt]
frontend=pager
email_address=root
confirm=0
save_seen=/var/lib/apt/listchanges.db
which=news
email_format=text
headers=false
reverse=false

Activo el servei amb l'opció “download-only” que descarrega les actualitzacions però no les instal·la automàticament:

# unattended-upgrades --help
Usage: unattended-upgrades [options]

Options:
  -h, --help            show this help message and exit
  -d, --debug           print debug messages
  --apt-debug           make apt/libapt print verbose debug messages
  -v, --verbose         print info messages
  --dry-run             Simulation, download but do not install
  --download-only       Only download, do not even try to install.
  --minimal-upgrade-steps
                        Upgrade in minimal steps (and allow interrupting with
                        SIGTERM) (default)
  --no-minimal-upgrade-steps
                        Upgrade in minimal steps (and allow interrupting with
                        SIGTERM
root@sermnserver:/etc/apt/apt.conf.d# unattended-upgrades --download-only

i faig un simulacre per confirmar que funciona,

# unattended-upgrade --dry-run

# grep unattended-upgrade daemon.log
Aug 10 12:31:37 sermnserver unattended-upgrade: Enabled logging to syslog via daemon facility 
Aug 10 12:31:37 sermnserver unattended-upgrade: Initial blacklist : 
Aug 10 12:31:37 sermnserver unattended-upgrade: Initial whitelist: 
Aug 10 12:31:37 sermnserver unattended-upgrade: Starting unattended upgrades script
Aug 10 12:31:37 sermnserver unattended-upgrade: Allowed origins are: origin=Debian,codename=buster,label=Debian, origin=Debian,codename=buster,label=Debian-Security
Aug 10 12:31:39 sermnserver unattended-upgrade: No packages found that can be upgraded unattended and no pending auto-removals

# cat unattended-upgrades.log 
2022-08-10 12:31:37,271 INFO Enabled logging to syslog via daemon facility 
2022-08-10 12:31:37,280 INFO Initial blacklist : 
2022-08-10 12:31:37,281 INFO Initial whitelist: 
2022-08-10 12:31:37,281 INFO Starting unattended upgrades script
2022-08-10 12:31:37,281 INFO Allowed origins are: origin=Debian,codename=buster,label=Debian, origin=Debian,codename=buster,label=Debian-Security
2022-08-10 12:31:39,064 INFO No packages found that can be upgraded unattended and no pending auto-removals

Referències

Reenviar el correu de root

Mentre no trobi una solució millor, el correu adreçat a root@localhost es reenviarà a sermnadmin@localhost i a miquel@sermn02.uab.cat:

# nano -c /etc/aliases
mailer-daemon: postmaster
postmaster: root
...
security: root
root: sermnadmin, miquel@sermn02.uab.cat

[AJORNADA] Actualització de dokuwiki a la versió 2022-07-31 "Igor"

Per ara no actualitzo la wiki a la nova versió 2022-07-31 “Igor” ja que no funciona amb versions de PHP anteriors a 7.2 ( veure Changelog).

[TODO] Instal·lació de timeshift

Cal instal·lar el paquet timeshift:

Timeshift is a system restore utility which takes snapshots of the system at regular intervals. These snapshots can be restored at a later date to undo system changes. Creates incremental snapshots using rsync or BTRFS snapshots using BTRFS tools. apt show timeshift

Referències

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
informatica/servidor_internet_2009_debian_10_part_4.txt · Last modified: 2022/08/10 13:26 by miquel