Tareas #6285

Actualizar versión de NextCloud del CURE

Added by Pablo García 7 months ago. Updated 4 months ago.

Status:ResueltaStart date:07/22/2019
Priority:NormalDue date:
Assignee:Pablo García% Done:

100%

Category:-Estimated time:20.00 hours
Target version:-Spent time:22.00 hours

Description

El Nextcloud del CURE está en la versión 13.07, y ya está disponible la versión estable 16.0

Hacer las pruebas necesarias, para ver los pasos necesarios para actualizar a la última versión estable.
Para ello, levantar un respaldo en Atlántico.

History

#1 Updated by Pablo García 7 months ago

  • % Done changed from 0 to 30

Actualización a la versión 14
borrar /var/www/html/owncloud/cron.log

después correr para que actualice:
sudo -u www-data php occ upgrade

salir de modo mantenimiento:
sudo -u www-data php occ maintenance:mode --off

Actualización a la versión 15
borrar /var/www/html/owncloud/cron.log

después correr para que actualice:
sudo -u www-data php occ upgrade

salir de modo mantenimiento:
sudo -u www-data php occ maintenance:mode --off

#2 Updated by Pablo García 7 months ago

Cambiar base de datos para sacar error:
Se usa MySQL como base de datos pero no soporta caracteres de 4 bytes. Para poder manejar caracteres de 4 bytes (como los emojis) sin problemas en los nombres de archivos o comentarios, se recomienda activar el soporte de 4 bytes en MySQL. Para más detalles consulta la página de documentación sobre esto.
https://docs.nextcloud.com/server/15/admin_manual/configuration_database/mysql_4byte_support.html

Pasar a modo mantenimiento:
sudo -u www-data php occ maintenance:mode --on

Agregar en archivo de configuración del mariadb-server
/etc/mysql/mariadb.conf.d/50-server.cnf
[mysqld]
innodb_large_prefix=true
innodb_file_format=barracuda
innodb_file_per_table=1

Reiniciar Mariadb:
service mysql restart

Acceder a la base de datos:
mysql -u root -p

USE INFORMATION_SCHEMA;
ALTER TABLE `owncloud`.`oc_accounts` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_activity` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_activity_mq` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_addressbookchanges` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_addressbooks` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_appconfig` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_authtoken` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_bruteforce_attempts` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_calendar_invitations` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_calendar_resources` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_calendar_rooms` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_calendarchanges` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_calendarobjects` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_calendarobjects_props` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_calendars` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_calendarsubscriptions` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_cards` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_cards_properties` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_comments` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_comments_read_markers` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_credentials` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_dav_properties` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_dav_shares` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_directlink` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_documents_invite` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_documents_member` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_documents_op` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_documents_revisions` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_documents_session` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_external_applicable` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_external_config` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_external_mounts` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_external_options` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_federated_reshares` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_file_locks` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_filecache` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_files_trash` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_flow_checks` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_flow_operations` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_group_admin` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_group_user` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_groups` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_jobs` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_ldap_group_mapping` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_ldap_group_members` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_ldap_user_mapping` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_lucene_status` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_migrations` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_mimetypes` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_mounts` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_notifications` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_notifications_pushtokens` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_oauth2_access_tokens` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_oauth2_clients` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_preferences` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_privatedata` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_properties` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_schedulingobjects` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_share` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_share_external` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_storages` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_systemtag` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_systemtag_group` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_systemtag_object_mapping` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_trusted_servers` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_twofactor_backupcodes` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_twofactor_providers` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_users` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_vcategory` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_vcategory_to_object` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_whats_new` ROW_FORMAT=DYNAMIC;

ALTER DATABASE nextcloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;

Salir de la base de datos y correr:
sudo -u www-data php occ config:system:set mysql.utf8mb4 --type boolean --value="true"

sudo -u www-data php occ maintenance:repair

Otra advertencia, correr:
sudo -u www-data php occ db:add-missing-indices

sudo -u www-data php occ db:convert-filecache-bigint

#3 Updated by Pablo García 7 months ago

Cambiar cache:
instalar php-apcu
apt install php-apcu

Reiniciar apache:
service apache2 restart

agregar en /var/www/html/owncloud/config/config.php:
'memcache.local' => '\OC\Memcache\APCu',

#4 Updated by Pablo García 4 months ago

Pasos a seguir para la actualización:

###########################################################

Instalar Byobu:
apt update
apt install byobu -y

Actualizar sistema:
apt upgrade -y

###########################################################

Servidor Nextcloud (nube2.cure.edu.uy)

Actualización a la versión 14
Instalar PHP cURL, si no se instaló antes:
apt install php-curl

Reinciar apache2:
service apache2 restart

borrar /var/www/html/owncloud/cron.log

después correr para que actualice:
sudo -u www-data php occ upgrade

faltan algunos índices:
sudo -u www-data php occ db:add-missing-indices

salir de modo mantenimiento:
sudo -u www-data php occ maintenance:mode --off

###########################################################

Actualización a la versión 15
borrar /var/www/html/owncloud/cron.log

después correr para que actualice:
sudo -u www-data php occ upgrade

Cambiar base de datos para sacar error:
Se usa MySQL como base de datos pero no soporta caracteres de 4 bytes. Para poder manejar caracteres de 4 bytes (como los emojis) sin problemas en los nombres de archivos o comentarios, se recomienda activar el soporte de 4 bytes en MySQL. Para más detalles consulta la página de documentación sobre esto.
https://docs.nextcloud.com/server/15/admin_manual/configuration_database/mysql_4byte_support.html

##Pasar a modo mantenimiento:
##sudo -u www-data php occ maintenance:mode --on

Agregar en archivo de configuración del mariadb-server
/etc/mysql/mariadb.conf.d/50-server.cnf
[mysqld]
innodb_large_prefix=true
innodb_file_format=barracuda
innodb_file_per_table=1

Reiniciar Mariadb:
service mysql restart

Acceder a la base de datos:
mysql -u root -p

USE INFORMATION_SCHEMA;
ALTER TABLE `owncloud`.`oc_accounts` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_activity` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_activity_mq` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_addressbookchanges` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_addressbooks` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_appconfig` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_authtoken` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_bruteforce_attempts` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_calendar_invitations` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_calendar_resources` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_calendar_rooms` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_calendarchanges` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_calendarobjects` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_calendarobjects_props` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_calendars` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_calendarsubscriptions` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_cards` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_cards_properties` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_comments` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_comments_read_markers` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_credentials` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_dav_properties` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_dav_shares` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_directlink` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_documents_invite` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_documents_member` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_documents_op` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_documents_revisions` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_documents_session` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_external_applicable` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_external_config` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_external_mounts` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_external_options` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_federated_reshares` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_file_locks` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_filecache` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_files_trash` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_flow_checks` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_flow_operations` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_group_admin` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_group_user` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_groups` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_jobs` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_ldap_group_mapping` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_ldap_group_members` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_ldap_user_mapping` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_lucene_status` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_migrations` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_mimetypes` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_mounts` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_notifications` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_notifications_pushtokens` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_oauth2_access_tokens` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_oauth2_clients` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_preferences` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_privatedata` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_properties` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_schedulingobjects` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_share` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_share_external` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_storages` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_systemtag` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_systemtag_group` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_systemtag_object_mapping` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_trusted_servers` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_twofactor_backupcodes` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_twofactor_providers` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_users` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_vcategory` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_vcategory_to_object` ROW_FORMAT=DYNAMIC;
ALTER TABLE `owncloud`.`oc_whats_new` ROW_FORMAT=DYNAMIC;

ALTER DATABASE owncloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;

Salir de la base de datos y correr:
sudo -u www-data php occ config:system:set mysql.utf8mb4 --type boolean --value="true"

sudo -u www-data php occ maintenance:repair

Otra advertencia, correr:
sudo -u www-data php occ db:add-missing-indices

sudo -u www-data php occ db:convert-filecache-bigint

salir de modo mantenimiento:
sudo -u www-data php occ maintenance:mode --off

Cambiar cache:
instalar php-apcu y php-imagick
apt install php-apcu php-imagick

agregar en /var/www/html/owncloud/config/config.php:
'memcache.local' => '\OC\Memcache\APCu',

Reiniciar apache:
service apache2 restart

################################################################

Removemos PHP7.0 antes de actualizar la versión de Debian
apt remove php7.0-common php*
apt autoremove -y

################################################################

Actualizar de Debian 9 a Debian 10:
Actualizar
apt update
apt upgrade -y

cambiar en /etc/apt/sources.list y en /etc/apt/sources.list.d/strech-backports.list
stretch por buster

apt update
apt upgrade -y
apt dist-upgrade -y
reboot

Volver a configurar:
-zabbix agent

################################################################

apt remove php7.0*
apt autoremove

Volvemos a instalar php
apt install libapache2-mod-php php-simplexml php-zip php-mbstring php-gd php-ldap php-intl php-cli php-bz2 php-mysql php-apcu php-pear libgd-tools libgd-dev php-curl php-imagick -y

service apache2 restart

################################################################

Actualización a la versión 16

cd /var/www/html/owncloud/
rm cron.log

sudo -u www-data php occ upgrade
sudo -u www-data php occ db:add-missing-indices

editar el archivo php.ini en:
/etc/php/7.3/apache2/php.ini

memory_limit = 1G
upload_max_filesize = 2G
max_file_uploads = 200

service apache2 restart

sudo -u www-data php occ maintenance:mode --off

#5 Updated by Pablo García 4 months ago

  • Status changed from En curso to Resuelta
  • % Done changed from 30 to 100

Quedó hecha la actualización correctamente.

Also available in: Atom PDF