Actualizar Centos 6 a Centos 7 al vuelo en servidores con cPanel

Actualizar Centos 6 a Centos 7 al vuelo

Ya a punto de finalizar el fin de vida de Centos 6 (30 de Noviembre de 2020) es hora de actualizar los sistemas basados en Centos 6 ha Centos 7. No hay procedimiento oficial, y los servidores deben ser actualizados mediante una serie de trabajos. Muchas empresas de VPs y dedicados, no ofrecen a sus clientes una salida a este problema, y les obligan a contratar un segundo equipo o VPS, y realizar una migración manual al nuevo sistema, con las complejidades, tiempos perdidos y posibles problemas que esto tiene. Pero todo es posible, sobre todo si tienes un sistema cPanel, actualizar Centos 6 a Centos 7 al vuelo en servidores con cPanel.

Introducción

El sistema que en este documento se describe lo es para un sistema sin panel de control obstructivo, como cPanel, Plesk, VestaCp, DirectAdmin. Sin embargo ha sido probado en producción con más de 30 VPS basados en cPanel y con algunos trabajos y conocimientos extras, es válido.

Descarga de responsabilidades

El presente artículo no incurre en ninguna responsabilidad del autor en caso de que el lector en su aplicación, no consiga el resultado deseado, o le suponga la perdida de datos o tiempo. Es simplemente una guía gratuita de un procedimiento no estándar, que requiere de conocimientos avanzados de administración de sistemas, y en particular de Centos y cPanel. Si usted no posee estos conocimientos, y le aconsejamos que contrate con nosotros o con terceros un soporte que le garantice el trabajo a realizar.

En días próximos, vamos a testear el trabajo con un plesk, aunque ciertamente, lo dudamos pues con este panel hemos tenido problemas hasta para migrar de una simple versión de plesk a otra superior.

Pasos para actualizar Centos 6 a Centos 7 al vuelo

Requisitos

  • Se debería disponer de consola, ya sea física, virtual o remota.
  • Actualizar antes de hacer nada.
  • Tener copia de seguridad de todos los datos. Si es un sistema virtualizado, tomar un snapshot, antes del proceso.
  • Aconsejable deshabilitar selinux, ya que en ciertos escenarios puede ser un problema, cuando menos un tiempo largo en el reinicio de actualización.
  • Revisar y eliminar los repositorios que no estén en uso.
Desde hace años, virtualizo todos mis sistemas, incluso si ocupan un servidor completo. Jamás, uso un servidor como Bare Metal (uso completo). Mis motivos son sencillo. No es escalable de forma sencilla. Sin embargo un sistema basado de KVM (por ejemplo) es fácilmente escalable. migrando su virtualización a una máquina nueva

Actualización

Instalación del repositorio

[root@localhost ~]# cat > /etc/yum.repos.d/centos-upgrade.repo <<EOF
[centos-upgrade]
name=centos-upgrade
baseurl=https://buildlogs.centos.org/centos/6/upg/x86_64/
enabled=1
gpgcheck=0
EOF

Instalación de openscap 1.0.8

Instalaremos la version de openscap 1.0.8 desde su repositorio via url ya que de hacerlo con yum directamente nos instalaría una versión mas moderno que no es compatible con el actualizador.

[root@localhost ~]# yum -y install https://buildlogs.centos.org/centos/6/upg/x86_64/Packages/openscap-1.0.8-1.0.1.el6.centos.x86_64.rpm
Complementos cargados:fastestmirror, security
Configurando el proceso de instalación
openscap-1.0.8-1.0.1.el6.centos.x86_64.rpm | 2.9 MB 00:01
Examinando /var/tmp/yum-root-FWHxQC/openscap-1.0.8-1.0.1.el6.centos.x86_64.rpm: openscap-1.0.8-1.0.1.el6.centos.x86_64
Marcando /var/tmp/yum-root-FWHxQC/openscap-1.0.8-1.0.1.el6.centos.x86_64.rpm para ser instalado
Loading mirror speeds from cached hostfile
* base: mirror.airenetworks.es
* extras: mirror.tedra.es
* updates: mirror.airenetworks.es
Resolviendo dependencias
--&gt; Ejecutando prueba de transacción
---&gt; Package openscap.x86_64 0:1.0.8-1.0.1.el6.centos will be instalado
--&gt; Resolución de dependencias finalizada

Dependencias resueltas

==============================================================================================================================================================================================
Paquete Arquitectura Versión Repositorio Tamaño
==============================================================================================================================================================================================
Instalando:
openscap x86_64 1.0.8-1.0.1.el6.centos /openscap-1.0.8-1.0.1.el6.centos.x86_64 42 M

Resumen de la transacción
==============================================================================================================================================================================================
Instalar 1 Paquete(s)

Tamaño total: 42 M
Tamaño instalado: 42 M
Descargando paquetes:
Ejecutando el rpm_check_debug
Ejecutando prueba de transacción
La prueba de transacción ha sido exitosa
Ejecutando transacción
Advertencia: Las bases de datos (RPMDB) han sido modificadas por un elemento ajeno a yum.
Instalando : openscap-1.0.8-1.0.1.el6.centos.x86_64 1/1
Verifying : openscap-1.0.8-1.0.1.el6.centos.x86_64 1/1

Instalado:
openscap.x86_64 0:1.0.8-1.0.1.el6.centos

¡Listo!

Instalación de las herramientas de actualización y el asistente de actualización

root@localhost ~]# yum -y install redhat-upgrade-tool preupgrade-assistant-*
Complementos cargados:fastestmirror, security
Configurando el proceso de instalación
Loading mirror speeds from cached hostfile
 * base: mirror.airenetworks.es
 * extras: mirror.tedra.es
 * updates: mirror.airenetworks.es
Resolviendo dependencias
--> Ejecutando prueba de transacción
---> Package preupgrade-assistant.x86_64 0:1.0.2-36.0.1.el6.centos will be instalado
---> Package preupgrade-assistant-contents.noarch 0:0.5.14-1.el6.centos will be instalado
---> Package preupgrade-assistant-ui.x86_64 0:1.0.2-36.0.1.el6.centos will be instalado
---> Package redhat-upgrade-tool.noarch 1:0.7.22-3.el6.centos will be instalado
--> Resolución de dependencias finalizada

Dependencias resueltas

==============================================================================================================================================================================================
 Paquete                                                 Arquitectura                     Versión                                              Repositorio                              Tamaño
==============================================================================================================================================================================================
Instalando:
 preupgrade-assistant                                    x86_64                           1.0.2-36.0.1.el6.centos                              centos-upgrade                           439 k
 preupgrade-assistant-contents                           noarch                           0.5.14-1.el6.centos                                  centos-upgrade                           917 k
 preupgrade-assistant-ui                                 x86_64                           1.0.2-36.0.1.el6.centos                              centos-upgrade                           6.6 M
 redhat-upgrade-tool                                     noarch                           1:0.7.22-3.el6.centos                                centos-upgrade                            85 k

Resumen de la transacción
==============================================================================================================================================================================================
Instalar       4 Paquete(s)

Tamaño total de la descarga: 8.0 M
Tamaño instalado: 39 M
Descargando paquetes:
(1/4): preupgrade-assistant-1.0.2-36.0.1.el6.centos.x86_64.rpm                                                                                                         | 439 kB     00:00
(2/4): preupgrade-assistant-contents-0.5.14-1.el6.centos.noarch.rpm                                                                                                    | 917 kB     00:00
(3/4): preupgrade-assistant-ui-1.0.2-36.0.1.el6.centos.x86_64.rpm                                                                                                      | 6.6 MB     00:04
(4/4): redhat-upgrade-tool-0.7.22-3.el6.centos.noarch.rpm                                                                                                              |  85 kB     00:00
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                         501 kB/s | 8.0 MB     00:16
Ejecutando el rpm_check_debug
Ejecutando prueba de transacción
La prueba de transacción ha sido exitosa
Ejecutando transacción
  Instalando    : preupgrade-assistant-1.0.2-36.0.1.el6.centos.x86_64                                                                                                                     1/4
  Instalando    : preupgrade-assistant-ui-1.0.2-36.0.1.el6.centos.x86_64                                                                                                                  2/4
  Instalando    : 1:redhat-upgrade-tool-0.7.22-3.el6.centos.noarch                                                                                                                        3/4
  Instalando    : preupgrade-assistant-contents-0.5.14-1.el6.centos.noarch                                                                                                                4/4
  Verifying     : preupgrade-assistant-1.0.2-36.0.1.el6.centos.x86_64                                                                                                                     1/4
  Verifying     : preupgrade-assistant-ui-1.0.2-36.0.1.el6.centos.x86_64                                                                                                                  2/4
  Verifying     : 1:redhat-upgrade-tool-0.7.22-3.el6.centos.noarch                                                                                                                        3/4
  Verifying     : preupgrade-assistant-contents-0.5.14-1.el6.centos.noarch                                                                                                                4/4

Instalado:
  preupgrade-assistant.x86_64 0:1.0.2-36.0.1.el6.centos       preupgrade-assistant-contents.noarch 0:0.5.14-1.el6.centos       preupgrade-assistant-ui.x86_64 0:1.0.2-36.0.1.el6.centos
  redhat-upgrade-tool.noarch 1:0.7.22-3.el6.centos

¡Listo!
[root@localhost ~]# rpm --import http://mirror.centos.org/centos/7/os/x86_64/RPM-GPG-KEY-CentOS-7

Ejecución del asistente de actualización o preupgrade

Para evitar ciertos errores a posteriori vamos a crear una serie de directorios que usar el sistema de actualización

[root@localhost ~]#  mkdir -pv /var/tmp/system-upgrade/base/ /var/tmp/system-upgrade/extras/ /var/tmp/system-upgrade/updates/
mkdir: se ha creado el directorio «/var/tmp/system-upgrade»
mkdir: se ha creado el directorio «/var/tmp/system-upgrade/base/»
mkdir: se ha creado el directorio «/var/tmp/system-upgrade/extras/»
mkdir: se ha creado el directorio «/var/tmp/system-upgrade/updates/»
[root@localhost ~]# echo http://mirror.centos.org/centos/7/os/x86_64/ >> /var/tmp/system-upgrade/base/mirrorlist.txt
[root@localhost ~]# echo http://mirror.centos.org/centos/7/extras/x86_64/ >> /var/tmp/system-upgrade/extras/mirrorlist.txt
[root@localhost ~]# echo http://mirror.centos.org/centos/7/updates/x86_64/ >> /var/tmp/system-upgrade/updates/mirrorlist.txt

Ejecutar el asistente de pre-actualización

Lanzar la herramienta de comprobación o chequeo para la actualización. Es normal que tarde algo en realziar sus funciones, según el número de paquetes, grupos de paquetes, y repositorios activos.

Algunas lineas han sido sustituidas por … por ser información irrelevante

[root@localhost ~]#  yes | preupg -v 

Preupg tool doesn't do the actual upgrade.
Please ensure you have backed up your system and/or data in the event of a failed upgrade
 that would require a full re-install of the system from installation media.
Do you want to continue? y/n
Gathering logs used by preupgrade assistant:
All installed packages : 01/11 ...running ********finished (time 00:00s)
All changed files      : 02/11 ...running ********finished (time 00:24s)
Changed config files   : 03/11 ...running ********finished (time 00:00s)
All users              : 04/11 ...running ********finished (time 00:00s)
All groups             : 05/11 ...running ********finished (time 00:00s)
Service statuses       : 06/11 ...running ********finished (time 00:00s)
All installed files    : 07/11 ...running ********finished (time 00:01s)
All local files        : 08/11 ...running ********finished (time 00:00s)
All executable files   : 09/11 ...running ********finished (time 00:00s)
RedHat signed packages : 10/11 ...running ********finished (time 00:00s)
CentOS signed packages : 11/11 ...running ********finished (time 00:00s)
Assessment of the system, running checks / SCE scripts:
001/096 ...running (Configuration Files to Review)***************************************done    (Configuration Files to Review)
002/096 ...running (File Lists for Manual Migration)*****************************************done    (File Lists for Manual Migration)
003/096 ...running (Bacula Backup Software)********************************done    (Bacula Backup Software)
004/096 ...running (MySQL configuration)*****************************done    (MySQL configuration)
005/096 ...running (Migration of the MySQL data stack)*******************************************done    (Migration of the MySQL data stack)
006/096 ...running (Changes related to moving from MySQL to MariaDB)*********************************************************done    (Changes related to moving from MySQL to MariaDB)
007/096 ...running (PostgreSQL upgrade content)****************a********************done    (PostgreSQL upgrade content)
008/096 ...running (GNOME Desktop Environment underwent severl design modifications in CentOS 7 release)**********************************************************************************************done    (GNOME Desktop Environment underwent several design modifications in CentOS 7 release)
009/096 ...running (KDE Desktop Environment underwent several design modifications in CentOS 7 release)********************************************************************************************done    (KDE Desktop Environment underwent several design modifications in CentOS 7 release)
010/096 ...running (several graphic drivers not supported in CentOS 7)***********************************************************done    (several graphic drivers not supported in CentOS 7)
011/096 ...running (several input drivers not supported in CentOS 7)*********************************************************done    (several input drivers not supported in CentOS 7)
012/096 ...running (several kernel networking drivers not available in CentOS 7)*********************************************************************done    (several kernel networking drivers not available in CentOS 7)
013/096 ...running (several kernel storage drivers not available in CentOS 7)******************************************************************done    (several kernel storage drivers not available in CentOS 7)
014/096 ...running (Names, Options and Output Format Changes in arptables)***************************************************************done    (Names, Options and Output Format Changes in arptables)
015/096 ...running (BIND9 running in a chroot environment check.)******************************************************done    (BIND9 running in a chroot environment check.)
016/096 ...running (BIND9 configuration compatibility check)*************************************************done    (BIND9 configuration compatibility check)
017/096 ...running (Move dhcpd/dhcprelay arguments from /etc/sysconfig/* to *.service files)*********************************************************************************done    (Move dhcpd/dhcprelay arguments from /etc/sysconfig/* to *.service files)
018/096 ...running (DNSMASQ configuration compatibility check)***************************************************done    (DNSMASQ configuration compatibility check)
019/096 ...running (Dovecot configuration compatibility check)***************************************************done    (Dovecot configuration compatibility check)
020/096 ...running (Compatibility Between iptables and ip6tables)******************************************************done    (Compatibility Between iptables and ip6tables)
021/096 ...running (Net-SNMP check)************************done    (Net-SNMP check)
022/096 ...running (Squid configuration compatibility check)*************************************************done    (Squid configuration compatibility check)
023/096 ...running (Reusable Configuration Files)**************************************done    (Reusable Configuration Files)
024/096 ...running (VCS repositories)**************************done    (VCS repositories)
025/096 ...running (Added and extended options for BIND9 configuration)************************************************************done    (Added and extended options for BIND9 configuration)
026/096 ...running (Added options in DNSMASQ configuration)************************************************done    (Added options in DNSMASQ configuration)
027/096 ...running (Packages not signed by CentOS)***************************************done    (Packages not signed by CentOS)
028/096 ...running (Obsoleted rpms)************************done    (Obsoleted rpms)
029/096 ...running (w3m not available in CentOS 7)***************************************done    (w3m not available in CentOS 7)
030/096 ...running (report incompatibilities between CentOS 6 and 7 in qemu-guest-agent package)*************************************************************************************done    (report incompatibilities between CentOS 6 and 7 in qemu-guest-agent package)
031/096 ...running (Removed options in coreutils binaries)***********************************************done    (Removed options in coreutils binaries)
032/096 ...running (Removed options in gawk binaries)******************************************done    (Removed options in gawk binaries)
033/096 ...running (Removed options in netstat binary)*******************************************done    (Removed options in netstat binary)
034/096 ...running (Removed options in quota tools)****************************************done    (Removed options in quota tools)
035/096 ...running (Removed rpms)**********************done    (Removed rpms)
036/096 ...running (Replaced rpms)***********************done    (Replaced rpms)
037/096 ...running (GMP library incompatibilities)***************************************done    (GMP library incompatibilities)
038/096 ...running (package downgrades)****************************done    (package downgrades)
039/096 ...running (restore custom selinux configuration)**********************************************done    (restore custom selinux configuration)
040/096 ...running (General)*****************done    (General)
041/096 ...running (samba shared directories selinux)******************************************done    (samba shared directories selinux)
042/096 ...running (CUPS Browsing/BrowsePoll configuration)************************************************done    (CUPS Browsing/BrowsePoll configuration)
043/096 ...running (CVS Package Split)***************************done    (CVS Package Split)
044/096 ...running (FreeRADIUS Upgrade Verification)*****************************************done    (FreeRADIUS Upgrade Verification)
045/096 ...running (httpd configuration compatibility check)*************************************************done    (httpd configuration compatibility check)
046/096 ...running (bind-dyndb-ldap)*************************done    (bind-dyndb-ldap)
047/096 ...running (Identity Management Server compatibility check)********************************************************done    (Identity Management Server compatibility check)
048/096 ...running (IPA Server CA Verification)************************************done    (IPA Server CA Verification)
049/096 ...running (NTP configuration)***************************done    (NTP configuration)
050/096 ...running (Information on time-sync.target)*****************************************done    (Information on time-sync.target)
051/096 ...running (OpenLDAP /etc/sysconfig and data compatibility)********************************************************done    (OpenLDAP /etc/sysconfig and data compatibility)
052/096 ...running (OpenSSH sshd_config migration content)***********************************************done    (OpenSSH sshd_config migration content)
053/096 ...running (OpenSSH sysconfig migration content)*********************************************done    (OpenSSH sysconfig migration content)
054/096 ...running (Configuration for quota_nld service)*********************************************done    (Configuration for quota_nld service)
055/096 ...running (Disk quota netlink message daemon moved into quota-nld package)************************************************************************done    (Disk quota netlink message daemon moved into quota-nld package)
056/096 ...running (SSSD compatibility check)**********************************done    (SSSD compatibility check)
057/096 ...running (Luks encrypted partition)**********************************done    (Luks encrypted partition)
058/096 ...running (Clvmd and cmirrord daemon management.)***********************************************done    (Clvmd and cmirrord daemon management.)
059/096 ...running (State of LVM2 services.)*********************************done    (State of LVM2 services.)
060/096 ...running (device-mapper-multipath configuration compatibility check)*******************************************************************done    (device-mapper-multipath configuration compatibility check)
061/096 ...running (Removal of scsi-target-utils)**************************************done    (Removal of scsi-target-utils)
062/096 ...running (Configuration for warnquota tool)******************************************done    (Configuration for warnquota tool)
063/096 ...running (Disk quota tool warnquota moved into quota-warnquota package)**********************************************************************done    (Disk quota tool warnquota moved into quota-warnquota package)
064/096 ...running (Architecture Support)******************************done    (Architecture Support)
065/096 ...running (Binary rebuilds)*************************done    (Binary rebuilds)
066/096 ...running (Debuginfo packages)****************************done    (Debuginfo packages)
067/096 ...running (Cluster and High Availability)***************************************done    (Cluster and High Availability)
068/096 ...running (Quorum implementation)*******************************done    (Quorum implementation)
069/096 ...running (fix krb5kdc config file)*********************************done    (fix krb5kdc config file)
070/096 ...running (File Systems, Partitions and Mounts Configuration Review)******************************************************************done    (File Systems, Partitions and Mounts Configuration Review)
071/096 ...running (Read Only FHS directories)***********************************done    (Read Only FHS directories)
072/096 ...running (Sonamebumped libs)***************************done    (Sonamebumped libs)
073/096 ...running (SonameKept Reusable Dynamic Libraries)***********************************************done    (SonameKept Reusable Dynamic Libraries)
074/096 ...running (Removed .so libs)**************************done    (Removed .so libs)
075/096 ...running (In-place Upgrade Requirements for the /usr/ Directory)***************************************************************done    (In-place Upgrade Requirements for the /usr/ Directory)
076/096 ...running (CA certificate bundles modified)*****************************************done    (CA certificate bundles modified)
077/096 ...running (Developer Tool Set packages)*************************************done    (Developer Tool Set packages)
078/096 ...running (Hyper-V)*****************done    (Hyper-V)
079/096 ...running (Content for enabling and disabling services based on CentOS 6 system)******************************************************************************done    (Content for enabling and disabling services based on CentOS 6 system)
080/096 ...running (Check for ethernet interface naming)*********************************************done    (Check for ethernet interface naming)
081/096 ...running (User modification in /etc/rc.local and /etc/rc.d/rc.local)*******************************************************************done    (User modification in /etc/rc.local and /etc/rc.d/rc.local)
082/096 ...running (cgroups configuration compatibility check)***************************************************done    (cgroups configuration compatibility check)
083/096 ...running (Plugable authentication modules (PAM))***********************************************done    (Plugable authentication modules (PAM))
084/096 ...running (Foreign Perl modules)******************************done    (Foreign Perl modules)
085/096 ...running (Python 2.7.5)**********************done    (Python 2.7.5)
086/096 ...running (Ruby 2.0.0)********************done    (Ruby 2.0.0)
087/096 ...running (SCL collections)*************************done    (SCL collections)
088/096 ...running (System kickstart)**************************done    (System kickstart)
089/096 ...running (YUM)*************done    (YUM)
090/096 ...running (Check for usage of dangerous range of UID/GIDs)********************************************************done    (Check for usage of dangerous range of UID/GIDs)
091/096 ...running (Incorrect usage of reserved UID/GIDs)**********************************************done    (Incorrect usage of reserved UID/GIDs)
092/096 ...running (NIS ypbind config files back-up)*****************************************done    (NIS ypbind config files back-up)
093/096 ...running (NIS Makefile back-up)******************************done    (NIS Makefile back-up)
094/096 ...running (NIS server maps check)*******************************done    (NIS server maps check)
095/096 ...running (NIS server MAXUID and MAXGID limits check)***************************************************done    (NIS server MAXUID and MAXGID limits check)
096/096 ...running (NIS server config file back-up)****************************************done    (NIS server config file back-up)
Assessment finished (time 01:34s)
Result table with checks and their results for main contents:
---------------------------------------------------------------------------------------------------------------
|Bacula Backup Software                                                                    |notapplicable     |
|Migration of the MySQL data stack                                                         |notapplicable     |
|Changes related to moving from MySQL to MariaDB                                           |notapplicable     |
|PostgreSQL upgrade content                                                                |notapplicable     |
|GNOME Desktop Environment underwent several design modifications in CentOS 7 release      |notapplicable     |
|KDE Desktop Environment underwent several design modifications in CentOS 7 release        |notapplicable     |
|several graphic drivers not supported in CentOS 7                                         |notapplicable     |
|several input drivers not supported in CentOS 7                                           |notapplicable     |
|Names, Options and Output Format Changes in arptables                                     |notapplicable     |
|BIND9 running in a chroot environment check.                                              |notapplicable     |
|BIND9 configuration compatibility check                                                   |notapplicable     |
|Move dhcpd/dhcprelay arguments from /etc/sysconfig/* to *.service files                   |notapplicable     |
|DNSMASQ configuration compatibility check                                                 |notapplicable     |
|Dovecot configuration compatibility check                                                 |notapplicable     |
|Net-SNMP check                                                                            |notapplicable     |
|Squid configuration compatibility check                                                   |notapplicable     |
|Added and extended options for BIND9 configuration                                        |notapplicable     |
|Added options in DNSMASQ configuration                                                    |notapplicable     |
|w3m not available in CentOS 7                                                             |notapplicable     |
|report incompatibilities between CentOS 6 and 7 in qemu-guest-agent package               |notapplicable     |
|restore custom selinux configuration                                                      |notapplicable     |
|samba shared directories selinux                                                          |notapplicable     |
|FreeRADIUS Upgrade Verification                                                           |notapplicable     |
|bind-dyndb-ldap                                                                           |notapplicable     |
|Identity Management Server compatibility check                                            |notapplicable     |
|IPA Server CA Verification                                                                |notapplicable     |
|OpenLDAP /etc/sysconfig and data compatibility                                            |notapplicable     |
|SSSD compatibility check                                                                  |notapplicable     |
|Clvmd and cmirrord daemon management.                                                     |notapplicable     |
|device-mapper-multipath configuration compatibility check                                 |notapplicable     |
|Removal of scsi-target-utils                                                              |notapplicable     |
|Quorum implementation                                                                     |notapplicable     |
|fix krb5kdc config file                                                                   |notapplicable     |
|cgroups configuration compatibility check                                                 |notapplicable     |
|Ruby 2.0.0                                                                                |notapplicable     |
|NIS ypbind config files back-up                                                           |notapplicable     |
|NIS Makefile back-up                                                                      |notapplicable     |
|NIS server maps check                                                                     |notapplicable     |
|NIS server MAXUID and MAXGID limits check                                                 |notapplicable     |
|NIS server config file back-up                                                            |notapplicable     |
|several kernel networking drivers not available in CentOS 7                               |pass              |
|several kernel storage drivers not available in CentOS 7                                  |pass              |
|Compatibility Between iptables and ip6tables                                              |pass              |
|NTP configuration                                                                         |pass              |
|Information on time-sync.target                                                           |pass              |
|OpenSSH sshd_config migration content                                                     |pass              |
|Configuration for quota_nld service                                                       |pass              |
|Disk quota netlink message daemon moved into quota-nld package                            |pass              |
|Luks encrypted partition                                                                  |pass              |
|Configuration for warnquota tool                                                          |pass              |
|Architecture Support                                                                      |pass              |
|Debuginfo packages                                                                        |pass              |
|Cluster and High Availability                                                             |pass              |
|Read Only FHS directories                                                                 |pass              |
|In-place Upgrade Requirements for the /usr/ Directory                                     |pass              |
|CA certificate bundles modified                                                           |pass              |
|Developer Tool Set packages                                                               |pass              |
|Hyper-V                                                                                   |pass              |
|Check for ethernet interface naming                                                       |pass              |
|User modification in /etc/rc.local and /etc/rc.d/rc.local                                 |pass              |
|Plugable authentication modules (PAM)                                                     |pass              |
|SCL collections                                                                           |pass              |
|System kickstart                                                                          |pass              |
|Check for usage of dangerous range of UID/GIDs                                            |pass              |
|MySQL configuration                                                                       |informational     |
|VCS repositories                                                                          |informational     |
|Removed options in coreutils binaries                                                     |informational     |
|Removed options in gawk binaries                                                          |informational     |
|Removed options in netstat binary                                                         |informational     |
|Removed options in quota tools                                                            |informational     |
|GMP library incompatibilities                                                             |informational     |
|CVS Package Split                                                                         |informational     |
|httpd configuration compatibility check                                                   |informational     |
|Disk quota tool warnquota moved into quota-warnquota package                              |informational     |
|File Systems, Partitions and Mounts Configuration Review                                  |informational     |
|Sonamebumped libs                                                                         |informational     |
|SonameKept Reusable Dynamic Libraries                                                     |informational     |
|Removed .so libs                                                                          |informational     |
|Foreign Perl modules                                                                      |informational     |
|YUM                                                                                       |informational     |
|Reusable Configuration Files                                                              |fixed             |
|Replaced rpms                                                                             |fixed             |
|package downgrades                                                                        |fixed             |
|CUPS Browsing/BrowsePoll configuration                                                    |fixed             |
|OpenSSH sysconfig migration content                                                       |fixed             |
|State of LVM2 services.                                                                   |fixed             |
|Configuration Files to Review                                                             |needs_inspection  |
|File Lists for Manual Migration                                                           |needs_inspection  |
|Obsoleted rpms                                                                            |needs_inspection  |
|Binary rebuilds                                                                           |needs_inspection  |
|Python 2.7.5                                                                              |needs_inspection  |
|Incorrect usage of reserved UID/GIDs                                                      |needs_inspection  |
|Packages not signed by CentOS                                                             |needs_action      |
|Removed rpms                                                                              |needs_action      |
|General                                                                                   |needs_action      |
|Content for enabling and disabling services based on CentOS 6 system                      |needs_action      |
---------------------------------------------------------------------------------------------------------------
./
./dirtyconf/
./dirtyconf/var/
./dirtyconf/var/lib/
./dirtyconf/var/lib/logrotate.status
...
...
./CentOS6_7/
./CentOS6_7/usrmgmt/
./CentOS6_7/usrmgmt/ReservedIDs/
./CentOS6_7/usrmgmt/ReservedIDs/solution.txt
./CentOS6_7/usrmgmt/ReservedIDs/reservedids.sh
./CentOS6_7/usrmgmt/ReservedIDs/uidgid
./CentOS6_7/usrmgmt/ReservedIDs/group.xml
...
...
./etc/
./etc/my.cnf
./README
./result.xml
./postupgrade.d/
./postupgrade.d/httpd.sh
./postupgrade.d/pkgdowngrades/
./postupgrade.d/pkgdowngrades/fixpkgdowngrades.sh
./postupgrade.d/clean_centos6_pkgs/
./postupgrade.d/clean_centos6_pkgs/postupgrade_cleanup.sh
./postupgrade.d/clean_centos6_pkgs/rpm_centossigned.log
...
...
./cleanconf/
./cleanconf/etc/
./cleanconf/etc/maven/
./cleanconf/etc/maven/maven2-depmap.xml
./cleanconf/etc/cups/
./cleanconf/etc/cups/cups-browsed.conf
./cleanconf/etc/cups/cupsd.conf
./cleanconf/etc/sysconfig/
./cleanconf/etc/sysconfig/sshd
./cleanconf/etc/ssh/
./cleanconf/etc/ssh/sshd_config
./cleanconf/etc/yum.conf
./result.html
./common/
./kickstart/
./kickstart/untrackedsystem
./kickstart/partitions
./kickstart/README
./kickstart/ObsoletedPkg-optional
./kickstart/untrackedtemporary
./kickstart/scripts
./kickstart/fstab
./kickstart/untrackedexpected
./kickstart/anaconda-ks.cfg
./kickstart/untrackeduser
./kickstart/CENTOS7rpmlist
./kickstart/RemovedPkg-optional
./kickstart/noverifycfg
./kickstart/noncentospkgs
./kickstart/NoSonameBumpLibs
/bin/tar: .: el fichero cambió mientras se estaba leyendo
Tarball with results is stored here /root/preupgrade-results/preupg_results-200615232742.tar.gz .
The latest assessment is stored in directory /root/preupgrade .
Summary information:
We found some potential in-place upgrade risks.
Read the file /root/preupgrade/result.html for more details.
Upload results to UI by command:
e.g. preupg -u http://127.0.0.1:8099/submit/ -r /root/preupgrade-results/preupg_results-*.tar.gz .

Descarga del informe a local para su revisión

En nuestra máquina local creamos un directorio, sincronizamos la carpeta del informe, y lanzamos el navegador para ver el informe.

$ mkdir ~/centos_upgrade && cd "$_"
$ rsync -avvz -e "ssh" root@192.168.1.41:/root/preupgrade-results/  centos_upgrade/preupgrade-results/   
$ google-chrome  ~/centos_upgrade/preupgrade-results/result.html
Actualización Centos 7 :: Pre-upgrade informe

Actualización a Centos 7

Ya es el momento, si todo está bien y tenemos claro lo que vamos a hacer, de lanzarnos la actualización. Es un proceso largo, que se recomienda se realice en un terminal multiplexada como screen.

root@localhost ~]# centos-upgrade-tool-cli --network=7 --instrepo=http://vault.centos.org/7.0.1406/os/x86_64/
setting up repos...
base                                                                                                                                                                   | 3.6 kB     00:00     
base/primary_db                                                                                                                                                        | 6.1 MB     00:03     
centos-upgrade                                                                                                                                                         | 1.9 kB     00:00     
centos-upgrade/primary_db                                                                                                                                              |  14 kB     00:00     
cmdline-instrepo                                                                                                                                                       | 3.6 kB     00:00     
cmdline-instrepo/primary_db                                                                                                                                            | 4.9 MB     00:04     
extras                                                                                                                                                                 | 2.9 kB     00:00     
extras/primary_db                                                                                                                                                      | 194 kB     00:00     
updates                                                                                                                                                                | 2.9 kB     00:00     
updates/primary_db                                                                                                                                                     | 2.1 MB     00:01     
.treeinfo                                                                                                                                                              | 1.1 kB     00:00     
Preupgrade assistant risk check found risks for this upgrade.
You can run preupg --riskcheck --verbose to view these risks.
Addressing high risk issues is required before the in-place upgrade
and ignoring these risks may result in a broken upgrade and unsupported upgrade.
Please backup your data.

List of issues:
INPLACERISK: HIGH: We detected some non-CentOS signed packages, you can find the list in /root/preupgrade/./kickstart/noncentospkgs. You need to handle them yourself!
INPLACERISK: HIGH: After upgrading to CentOS 7 there are still some el6 packages left. Add --cleanup-post option to redhat-upgrade-tool if you want to remove them automatically.
INPLACERISK: HIGH: There were changes in SELinux policies between CentOS 6 and CentOS 7. Please, check solution in order to resolve this issue.
INPLACERISK: HIGH: The service autofs on CentOS 7 is disabled by default. Enable them via commands: systemctl enable autofs && systemctl start autofs.service .
INPLACERISK: HIGH: The service blk-availability on CentOS 7 is disabled by default. Enable them via commands: systemctl enable blk-availability && systemctl start blk-availability.service .
INPLACERISK: HIGH: The service certmonger on CentOS 7 is disabled by default. Enable them via commands: systemctl enable certmonger && systemctl start certmonger.service .
INPLACERISK: HIGH: The service haldaemon on CentOS 7 is disabled by default. Enable them via commands: systemctl enable haldaemon && systemctl start haldaemon.service .
INPLACERISK: HIGH: The service ip6tables on CentOS 7 is disabled by default. Enable them via commands: systemctl enable ip6tables && systemctl start ip6tables.service .
INPLACERISK: HIGH: The service messagebus on CentOS 7 is disabled by default. Enable them via commands: systemctl enable messagebus && systemctl start messagebus.service .
INPLACERISK: HIGH: The service netfs on CentOS 7 is disabled by default. Enable them via commands: systemctl enable netfs && systemctl start netfs.service .
INPLACERISK: HIGH: The service network on CentOS 7 is disabled by default. Enable them via commands: systemctl enable network && systemctl start network.service .
INPLACERISK: HIGH: The service nfslock on CentOS 7 is disabled by default. Enable them via commands: systemctl enable nfslock && systemctl start nfslock.service .
INPLACERISK: HIGH: The service portreserve on CentOS 7 is disabled by default. Enable them via commands: systemctl enable portreserve && systemctl start portreserve.service .
INPLACERISK: HIGH: The service postfix on CentOS 7 is disabled by default. Enable them via commands: systemctl enable postfix && systemctl start postfix.service .
INPLACERISK: HIGH: The service rdma on CentOS 7 is disabled by default. Enable them via commands: systemctl enable rdma && systemctl start rdma.service .
INPLACERISK: HIGH: The service rpcgssd on CentOS 7 is disabled by default. Enable them via commands: systemctl enable rpcgssd && systemctl start rpcgssd.service .
INPLACERISK: HIGH: The service udev-post on CentOS 7 is disabled by default. Enable them via commands: systemctl enable udev-post && systemctl start udev-post.service .
INPLACERISK: MEDIUM: We detected some packages installed on the system were removed (obsoleted) between CentOS 6 and CentOS 7. This may break the functionality of the packages depending on them.
INPLACERISK: MEDIUM: We detected some packages installed on the system were removed between CentOS 6 and CentOS 7. This may break the functionality of the packages depending on them.
INPLACERISK: MEDIUM: Package ql2400-firmware not provided by its replacement linux-firmware. In-place upgrade might not work properly, will be finished by postupgrade script!
INPLACERISK: MEDIUM: Package ql2100-firmware not provided by its replacement linux-firmware. In-place upgrade might not work properly, will be finished by postupgrade script!
INPLACERISK: MEDIUM: Package ql2500-firmware not provided by its replacement linux-firmware. In-place upgrade might not work properly, will be finished by postupgrade script!
INPLACERISK: MEDIUM: Package rt61pci-firmware not provided by its replacement linux-firmware. In-place upgrade might not work properly, will be finished by postupgrade script!
INPLACERISK: MEDIUM: Package libudev not provided by its replacement systemd-libs. In-place upgrade might not work properly, will be finished by postupgrade script!
INPLACERISK: MEDIUM: Package coreutils-libs not provided by its replacement coreutils. In-place upgrade might not work properly, will be finished by postupgrade script!
INPLACERISK: MEDIUM: Package bfa-firmware not provided by its replacement linux-firmware. In-place upgrade might not work properly, will be finished by postupgrade script!
INPLACERISK: MEDIUM: Package rt73usb-firmware not provided by its replacement linux-firmware. In-place upgrade might not work properly, will be finished by postupgrade script!
INPLACERISK: MEDIUM: Package redhat-lsb-graphics not provided by its replacement redhat-lsb-desktop. In-place upgrade might not work properly, will be finished by postupgrade script!
INPLACERISK: MEDIUM: Package ql2200-firmware not provided by its replacement linux-firmware. In-place upgrade might not work properly, will be finished by postupgrade script!
INPLACERISK: MEDIUM: Package ql23xx-firmware not provided by its replacement linux-firmware. In-place upgrade might not work properly, will be finished by postupgrade script!
INPLACERISK: MEDIUM: having one of [mesa-dri-drivers sssd-ad mdadm libbasicobjects kpartx biosdevname nss sssd-krb5-common elfutils-libelf pixman libnl3 libxcb mesa-private-llvm libdrm mesa-libGL mesa-libGLU libpciaccess libref_array certmonger libX11 gtk2 ca-certificates java-1.7.0-openjdk nss-util nss-sysinit libipa_hbac python-sssdconfig sssd-common-pac sssd-ldap sssd audit-libs elfutils-libs openscap audit libini_config tzdata nspr libsss_idmap sssd-client sssd-ipa sssd-proxy libX11-common sssd-common nss-tools elfutils sssd-krb5 openldap json-c java-1.6.0-openjdk systemtap-runtime tzdata-java] package installed breaks upgrade
INPLACERISK: MEDIUM:  We detected some soname bumps in the libraries installed on the system. This may break the functionality of some of your 3rd party applications. They may need rebuild. Please check their requirements.
INPLACERISK: MEDIUM:  We detected some .so libraries installed on the system were removed between CentOS 6 and CentOS 7. This may break the functionality of some of your 3rd party applications.
INPLACERISK: MEDIUM: The  name cups-lpd was changed on CentOS 7 to one of these services:  cups-lpd.socket cups-lpd@.service
INPLACERISK: SLIGHT: We detected some files where modifications are not tracked in the rpms. You may need to check their functionality after successful upgrade.
INPLACERISK: SLIGHT: We detected some files untracked by rpms. Some of these may need manual check/migration after redhat-upgrade-tool and/or can cause conflicts or troubles during the installation. Try to reduce unnecessary untracked files before running redhat-upgrade-tool.
INPLACERISK: SLIGHT: We detected some packages installed on the system changed their name between CentOS 6 and CentOS 7. Although they should be compatible, monitoring after the update is recommended.
INPLACERISK: SLIGHT: export shell commands will be deleted from /etc/sysconfig/sshd
INPLACERISK: SLIGHT: Some scripts untracked by RPM were discovered on the system and may not work properly after upgrade.
INPLACERISK: SLIGHT: /usr/lib/python2.6/site-packages/paste is owned by an RPM package that was not signed by CentOS.
INPLACERISK: SLIGHT: /usr/lib/python2.6/site-packages/peak is owned by an RPM package that was not signed by CentOS.
INPLACERISK: SLIGHT: /usr/lib/python2.6/site-packages/repoze is owned by an RPM package that was not signed by CentOS.
INPLACERISK: SLIGHT: /usr/lib/python2.6/site-packages/zope is owned by an RPM package that was not signed by CentOS.
INPLACERISK: SLIGHT: /usr/lib64/python2.6/site-packages/report is not owned by any RPM package.
INPLACERISK: SLIGHT: /usr/lib64/python2.6/site-packages/reportclient is not owned by any RPM package.
Continue with the upgrade [Y/N]? Y
getting boot images...
vmlinuz-redhat-upgrade-tool                                                                                                                                            | 4.7 MB     00:04     
initramfs-redhat-upgrade-tool.img                                                                                                                                      |  32 MB     00:21     
setting up update...
finding updates 82% [==========================================================================================================================================                              ]base/filelists_db                                                                                                                                                      | 7.1 MB     00:04     
updates/filelists_db                                                                                                                                                   | 1.3 MB     00:00     
extras/filelists_db                                                                                                                                                    | 205 kB     00:00     
finding updates 100% [=======================================================================================================================================================================](1/983): GConf2-3.2.6-8.el7.x86_64.rpm                                                                                                                                 | 1.0 MB     00:00     
(2/983): GeoIP-1.5.0-14.el7.x86_64.rpm                                                                                                                                 | 1.5 MB     00:00     
(3/983): MySQL-python-1.2.5-1.el7.x86_64.rpm                                                                                                                           |  90 kB     00:00     
(4/983): ORBit2-2.14.19-13.el7.x86_64.rpm                                                                                                                              | 176 kB     00:00     
(5/983): PyGreSQL-4.0-9.el7.x86_64.rpm                                                                                                                                 |  74 kB     00:00     
(6/983): SDL-1.2.15-16.el7.x86_64.rpm                                                                                                                                  | 205 kB     00:00
. . .
(980/983): zip-3.0-11.el7.x86_64.rpm                                                                                                                                   | 260 kB     00:00
(981/983): zlib-1.2.7-18.el7.i686.rpm                                                                                                                                  |  91 kB     00:00
(982/983): zlib-1.2.7-18.el7.x86_64.rpm                                                                                                                                |  90 kB     00:00
(983/983): zlib-devel-1.2.7-18.el7.x86_64.rpm                                                                                                                          |  50 kB     00:00
testing upgrade transaction
rpm transaction 100% [=======================================================================================================================================================================]
rpm install 100% [===========================================================================================================================================================================]
setting up system for upgrade
Finished. Reboot to start upgrade.

Antes de reiniciar es conveniente activar el arranque del servidor SSH pues el actualizador lo ha des habilitado y por tanto no tendremos acceso SSH, obligándonos a trabajar en la terminal remota, IPMI, consola virtual etc. que suele ser bastante espartana.

[root@localhost ~]# systemctl enable sshd
[root@localhost ~]# reboot

Reinicio

Actualización Centos 7 :: Reinicio

Al reiniciar con toda seguridad tendréis un problema o error en las librerías.

Last login: Tue Jun 16 03:45:18 2020

grep: error while loading shared libraries: libpcre.so.0: cannot open shared object file: No such file or directory

/bin/grep: error while loading shared libraries: libpcre.so.0: cannot open shared object file: No such file or directory
Actualización Centos 7 :: Error en librerías pcre

Lanza lo siguiente para corregirlo:

ln -s /lib64/libpcre.so.1 /lib64/libpcre.so.0

Últimos pasos

Recomendable, revisar los repositorios para ver que todos los necesarios y usado, han sido actualizados a Centos7, ya que algunos no basan su fichero de configuración de la verificación de la variable de entorno o configuración que indica la versión de Centos que está ejecutándose.

Ejecutar nuevamente

yum -y update

cPanel

Aquí, llegamos a una parte en la que es una ayuda. Si bien en la descarga de responsabilidades del artículo ya indicamos que esto es un documento tal cual, sin ningún tipo de obligación legal o contractual con el lector, por los posibles problemas que puedan surgirle y que no sepa llevar a delante, con un sistema Centos 6 y cpanel, la advertencia requiere mayor énfasis.

Si no se tienen profundos conocimientos de cPanel y de CentOs mejor no hacer nada. 

He actualizado ya más de 35 VPS con CentOS 6 a Centos 7 con cPanel, y en 3 casos he tenido serios problemas que en una hora los he podido solucionar, pero de uno de ellos, ni el técnico de cPanel supo cómo sortearlos, y ellos tienen tendencia a contestar “no es el alcance de este soporte”

Servicio profesional de actualización

Actualice Centos 6 a Centos 7 con o sin cPanel en producción

Comparte este articulo en

Deja una respuesta

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax