Actualizado el domingo, 19 noviembre, 2017
En este articulo veremos de manera simple como actualizar a la nueva versión de debian 9, que ya comentamos sus particularidades en un articulo anterior.
Primero procedemos a actualizar el sistema por completo.
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
Reiniciamos…
sudo reboot
Modificamos el sources.list.
sudo nano /etc/apt/sources.list
Ejemplo de salida…
deb jessie main contrib deb main
Modificamos estas lineas por:
deb stretch main contrib deb main
Actualizamos.
sudo apt-get update
Ejemplo:
Get:1 http://mirrors.kernel.org stretch InRelease [195 kB] Get:2 http://security.debian.org stretch/updates InRelease [62.9 kB] Get:3 http://security.debian.org stretch/updates/main amd64 Packages [1,404 B] Get:4 http://security.debian.org stretch/updates/main Translation-en [1,767 B] Get:5 http://mirrors.kernel.org stretch/contrib Translation-en [45.9 kB] Get:6 http://mirrors.kernel.org stretch/main Translation-en [5,392 kB] Get:7 http://mirrors.kernel.org stretch/main amd64 Packages [7,095 kB] Get:8 http://mirrors.kernel.org stretch/contrib amd64 Packages [50.9 kB] Fetched 12.8 MB in 6s (2,129 kB/s) Reading package lists... Done Building dependency tree Reading state information... Done
sudo apt-get upgrade
Ejemplo de salida:
Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... The following packages were automatically installed and are no longer required: docutils-common docutils-doc libasprintf0c2 liblcms2-2 libpaper-utils libpaper1 libperl4-corelibs-perl libuuid-perl libwebp5 libwebpdemux1 libwebpmux1 python-docutils python-pil python-pygments python-roman Use 'apt-get autoremove' to remove them. Done The following packages have been kept back: apt apt-listchanges apt-utils aptitude aptitude-common bc bind9-host curl dbus dmsetup dnsutils eject exim4 exim4-base exim4-config exim4-daemon-light file ftp gnupg gnupg-agent gnupg2 ifupdown init init-system-helpers initramfs-tools initscripts iotop iproute2 iptables iputils-ping isc-dhcp-client isc-dhcp-common libarchive-extract-perl libavahi-client3 libc-bin libc6 libcairo2 libclass-c3-xs-perl libcpan-meta-perl libcryptsetup4 libcups2 libcurl3 libcurl3-gnutls libdbus-1-3 libdevmapper1.02.1 libfcgi-perl libfreetype6 libgcc1 libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-common libgnutls-openssl27 libgtk2.0-0 libgtk2.0-bin libhtml-parser-perl .... .. The following packages will be upgraded: acl acpi acpi-support-base acpid adduser aptitude-doc-en at base-files base-passwd bash bash-completion bsd-mailx bsdmainutils bsdutils busybox bzip2 ca-certificates console-setup console-setup-linux coreutils cpio cron dash dc debconf debconf-i18n debian-archive-keyring debian-faq debianutils dictionaries-common diffutils discover dmidecode doc-debian docutils-common docutils-doc dpkg e2fslibs e2fsprogs findutils fontconfig fontconfig-config fonts-dejavu-core geoip-database gettext-base gpgv grep groff-base grub-common grub-pc grub-pc-bin grub2-common gzip hicolor-icon-theme host hostname iamerican ibritish ienglish-common info insserv install-info .... .. 283 upgraded, 0 newly installed, 0 to remove and 115 not upgraded. Need to get 69.9 MB of archives. After this operation, 14.8 MB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://mirrors.kernel.org/debian/ stretch/main base-files amd64 9.9 [67.2 kB] Get:2 http://mirrors.kernel.org/debian/ stretch/main libtinfo5 amd64 6.0+20161126-1 [299 kB] Get:3 http://mirrors.kernel.org/debian/ stretch/main libncurses5 amd64 6.0+20161126-1 [93.4 kB] Get:4 http://mirrors.kernel.org/debian/ stretch/main libncursesw5 amd64 6.0+20161126-1 [115 kB] .... .... .. Get:281 http://mirrors.kernel.org/debian/ stretch/main xdg-user-dirs amd64 0.15-2+b1 [52.2 kB] Get:282 http://mirrors.kernel.org/debian/ stretch/main host all 1:9.10.3.dfsg.P4-12.3 [185 kB] Get:283 http://mirrors.kernel.org/debian/ stretch/main os-prober amd64 1.75 [29.8 kB] Fetched 69.9 MB in 1min 3s (1,104 kB/s) ... ... .. update-alternatives: using /usr/share/docutils/scripts/python2/rst2html4 to provide /usr/bin/rst2html4 (rst2html4) in auto mode update-alternatives: using /usr/share/docutils/scripts/python2/rst2html5 to provide /usr/bin/rst2html5 (rst2html5) in auto mode Setting up tasksel (3.39) ... Setting up task-english (3.39) ... Setting up task-ssh-server (3.39) ... Setting up tasksel-data (3.39) ... Processing triggers for libc-bin (2.19-18+deb8u9) ... Processing triggers for systemd (215-17+deb8u7) ... Processing triggers for ca-certificates (20161130+nmu1) ... Updating certificates in /etc/ssl/certs... 0 added, 0 removed; done. Running hooks in /etc/ca-certificates/update.d... done. Processing triggers for dictionaries-common (1.27.2) ... ispell-autobuildhash: Processing 'american' dict. ispell-autobuildhash: Processing 'british' dict.
sudo apt-get dist-upgrade
Ejemplo de salida:
Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... The following packages were automatically installed and are no longer required: docutils-common docutils-doc libasprintf0c2 libbind9-90 libdns100 libintl-perl libintl-xs-perl libisc95 libisccc90 libisccfg90 libjasper1 liblcms2-2 liblwres90 .... .. Done The following packages will be REMOVED: libcwidget3 libsigc++-2.0-0c2a perl-modules The following NEW packages will be installed: dh-python dirmngr distro-info-data firmware-linux-free gcc-6-base gnome-icon-theme gnupg-l10n gtk-update-icon-cache initramfs-tools-core irqbalance keyutils libapparmor1 libapt-inst2.0 libapt-pkg5.0 libb-hooks-endofscope-perl libbind9-140 libboost-filesystem1.62.0 libboost-iostreams1.62.0 libboost-system1.62.0 libc-l10n libclass-method-modifiers-perl libclass-xsaccessor-perl libcpan-changes-perl libcroco3 libcwidget3v5 libdata-perl-perl libdevel-caller-perl .... .. The following packages will be upgraded: apt apt-listchanges apt-utils aptitude aptitude-common bc bind9-host curl dbus dmsetup dnsutils eject exim4 exim4-base exim4-config exim4-daemon-light file ftp gnupg gnupg-agent gnupg2 ifupdown init init-system-helpers initramfs-tools initscripts iotop iproute2 iptables iputils-ping isc-dhcp-client isc-dhcp-common libarchive-extract-perl libavahi-client3 libc-bin libc6 libcairo2 libclass-c3-xs-perl libcpan-meta-perl libcryptsetup4 libcups2 libcurl3 libcurl3-gnutls libdbus-1-3 libdevmapper1.02.1 libfcgi-perl libfreetype6 libgcc1 libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-common libgnutls-openssl27 libgtk2.0-0 libgtk2.0-bin libhtml-parser-perl libintl-perl libldap-2.4-2 liblocale-gettext-perl libmagic1 libmodule-pluggable-perl libnet-ssleay-perl libparams-util-perl libpod-readme-perl libpython-stdlib libpython2.7-minimal libpython2.7-stdlib librtmp1 libsasl2-2 libsasl2-modules libstdc++6 libsub-name-perl libsystemd0 libtext-charwidth-perl libtext-iconv-perl libtext-soundex-perl libudev1 libuuid-perl libxml-libxml-perl libxml-parser-perl libxml2 linux-image-amd64 locales lsb-release mutt nfs-common openssh-client openssh-server openssh-sftp-server openssl perl perl-base pinentry-gtk2 procps python python-apt python-debianbts python-minimal python-pil python2.7 python2.7-minimal reportbug rsyslog systemd sysv-rc sysvinit-utils telnet texinfo udev util-linux util-linux-locales vim vim-common vim-runtime vim-tiny w3m wget 115 upgraded, 139 newly installed, 3 to remove and 0 not upgraded. Need to get 143 MB of archives. After this operation, 320 MB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://mirrors.kernel.org/debian/ stretch/main locales all 2.24-11 [3,290 kB] Get:2 http://mirrors.kernel.org/debian/ stretch/main libc-l10n all 2.24-11 [819 kB] Get:3 http://mirrors.kernel.org/debian/ stretch/main libc6 amd64 2.24-11 [2,691 kB] Get:4 http://mirrors.kernel.org/debian/ stretch/main libc-bin amd64 2.24-11 [779 kB] Get:5 http://mirrors.kernel.org/debian/ stretch/main gcc-6-base amd64 6.3.0-18 [180 kB] .... .. ... Get:250 http://mirrors.kernel.org/debian/ stretch/main w3m amd64 0.5.3-34 [1,030 kB] Get:251 http://mirrors.kernel.org/debian/ stretch/main gnupg-l10n all 2.1.18-6 [892 kB] Get:252 http://mirrors.kernel.org/debian/ stretch/main irqbalance amd64 1.1.0-2.3 [40.4 kB] Get:253 http://mirrors.kernel.org/debian/ stretch/main publicsuffix all 20170424.0717-1 [98.2 kB] Get:254 http://mirrors.kernel.org/debian/ stretch/main python-debianbts all 2.6.1 [11.5 kB] Fetched 143 MB in 1min 11s (2,000 kB/s) Reading changelogs... Done apt-listchanges: Mailing root: apt-listchanges: news for localhost Extracting templates from packages: 100% Preconfiguring packages ... Deferring configuration of apt-listchanges until python3 is available (Reading database ... 32357 files and directories currently installed.) Preparing to unpack .../locales_2.24-11_all.deb ... Unpacking locales (2.24-11) over (2.19-18+deb8u9) ... Selecting previously unselected package libc-l10n. Preparing to unpack .../libc-l10n_2.24-11_all.deb ... Unpacking libc-l10n (2.24-11) ... Preparing to unpack .../libc6_2.24-11_amd64.deb ... Checking for services that may need to be restarted... Checking init scripts... Unpacking libc6:amd64 (2.24-11) over (2.19-18+deb8u9) ... Setting up libc6:amd64 (2.24-11) ... Checking for services that may need to be restarted... Checking init scripts...
Reiniciamos.
sudo reboot
Verifica actualización correcta:
lsb_release -a
Ejemplo de salida:
:No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 9.0 (stretch) Release: 9.0 Codename: stretch
Como ves la actualización se a realizado correctamente. Ya puedes disfrutar de tu flamante debian 9.
mmmmm, parece sencillo…, en todo caso los pasos son sencillos pero no es tan fácil.
Cada vez que actualizo una distro me encomiendo a Linus Torvalds.
Hay que tener cuidado con los servicios. Lo aconsejable, más teniendo servidores en producción, es leer previamente los cambios de los mismos para que al momento de las «famosas interrogativas» de la instalación no te sorprenda, y demores la misma o lo peor, arruines un servicio.
Está claro que antes que nada, un buen backup completo para evitar dolores de cabeza.