Blog Sébastien Dubois (@sebfox)
SysAdmin, Debian, DIY & actions pro.
  • Home
  • Vidéos
  • Profil Linkedin
  • CV
  • Home
  • Vidéos
  • Profil Linkedin
  • CV
  • Accueil
  • /
  • TIC/Sysadmin

Passage de OwnCloud 8.1.9 (paquets OpenSuse) à 9.1.5 (paquets officiels OwnCloud pour Debian ) / Cas Debian 7

Cet article est une suite logique de https://sdubois.fr/blog/2016/01/11/mise-a-jour-owncloud-server-8-0-9-sous-debian-wheezy-paquets-opensuse/

Le contexte est que depuis mars 2016 il n’y a plus d’update du paquet Owncloud sur les dépots OpenSuse (stoppé à OwnCloud 8.1.9)
Voici la procédure pour passer sur les dépôts officiels OwnCloud pour Debian. Dans le cas testé, on va réaliser 3 upgrade majeurs d’affilé !

ATTENTION : Il faut faire par étape car le process d’upgrade ne supporte pas plusieurs montée de version majeures !!
(vous risquez d’avoir une erreur du type : Exception: Updates between multiple major versions and downgrades are unsupported.
Update failed)

rem : Les erreurs non bloquantes listées par la suite du type (An exception occurred while executing ‘CREATE TABLE `oc_activity`) sont lié à un test d’upgrade initial de 8.1 à 9.1 :p

  • Passage en 8.2 :

    • Modif du chemin sources.list  :
      [cf https://doc.owncloud.org/server/8.1/admin_manual/maintenance/package_upgrade.html]
      Il faut donc ajouter dans  /etc/apt/sources.list.d/owncloud.list
      https://download.owncloud.org/download/repositories/8.2/owncloud/
      puis en ayant validé la clé GPG faire un aptitude update/upgrade
    • Suppression paquet (facultatif sauf si vous aviez fait un upgrade en sautant une version majeure précédemment :p)
      root@serveur:/var/www/owncloud# aptitude remove owncloudLes paquets suivants seront ENLEVÉS :
      owncloud owncloud-deps-php5{u} owncloud-files{u} php5-ldap{u}
      0 paquets mis à jour, 0 nouvellement installés, 4 à enlever et 0 non mis à jour.
      Il est nécessaire de télécharger 0 o d’archives. Après dépaquetage, 93,1 Mo seront libérés.
      Voulez-vous continuer ? [Y/n/?]
      (Lecture de la base de données… 61785 fichiers et répertoires déjà installés.)
      Suppression de owncloud …
      Suppression de owncloud-deps-php5 …
      Suppression de owncloud-files …
      dpkg : avertissement : lors de la suppression de owncloud-files, le répertoire « /var/www/owncloud/config » n’était pas vide, donc il n’a pas été supprimé
      dpkg : avertissement : lors de la suppression de owncloud-files, le répertoire « /var/www/owncloud/data » n’était pas vide, donc il n’a pas été supprimé
      Suppression de php5-ldap …
      Traitement des actions différées (« triggers ») pour « libapache2-mod-php5 »…
      [ ok ] Reloading web server config: apache2.
    • Install nouveau paquet en 8.2
      root@serveur:/var/www/owncloud# aptitude install owncloud owncloud-files
      Les NOUVEAUX paquets suivants vont être installés :
      owncloud owncloud-config-apache{a} owncloud-files owncloud-server{a}
      php5-cgi{a} php5-ldap{a}
      0 paquets mis à jour, 6 nouvellement installés, 0 à enlever et 0 non mis à jour.
      Il est nécessaire de télécharger 68,3 Mo/68,3 Mo d’archives. Après dépaquetage, 183 Mo seront utilisés.
      Voulez-vous continuer ? [Y/n/?]
    • Upgrade en ligne de commande
      root@serveur:/var/www/owncloud# sudo -u www-data php occ upgrade
      ownCloud or one of the apps require upgrade – only a limited number of commands are available
      You may use your browser or the occ upgrade command to do the upgrade
      Set log level to debug – current level: ‘Debug’
      Checking whether the database schema can be updated (this can take a long time depending on the database size)
      Checked database schema update
      Checking updates of apps
      Checking whether the database schema for <files_sharing> can be updated (this can take a long time depending on the database size)
      Checking whether the database schema for <files_trashbin> can be updated (this can take a long time depending on the database size)
      Checked database schema update for apps
      Updating database schema
      Updated database
      Updating <files_texteditor> …
      Updated <files_texteditor> to 2.0
      Updating <gallery> …
      Updated <gallery> to 14.2.0
      Updating <files> …
      Updated <files> to 1.2.1
      Updating <files_sharing> …
      Updated <files_sharing> to 0.7.0
      Updating <files_trashbin> …
      Updated <files_trashbin> to 0.7.0
      Updating <files_versions> …
      Updated <files_versions> to 1.1.0
      Update successful
      Maintenance mode is kept active
      Reset log level to ‘Debug’
    • Sortie du mode maintenance pour valider
      root@serveur:/var/www/owncloud# sudo -u www-data php occ maintenance:mode –off
      ownCloud is in maintenance mode – no app have been loaded
      Maintenance mode disabled
    • Vérifier la partie Web
  • PUIS Passage en 9.0

    • Il faut à nouveau mettre le bon repository (cf https://download.owncloud.org/download/repositories/9.0/owncloud/).Ne pas oublier de valider la clé.
    • Attention juste owncloud-files à installer
      root@mail:/var/cache/apt/archives# apt-get install owncloud-files
    • Upgrade occ en ligne de commande

      root@serveur:/var/www/owncloud# sudo -u www-data php occ upgrade
      ownCloud or one of the apps require upgrade – only a limited number of commands are available
      You may use your browser or the occ upgrade command to do the upgrade
      – Hint: You can speed up the upgrade by executing this SQL command manually: ALTER TABLE `*PREFIX*filecache` ADD COLUMN checksum varchar(255) DEFAULT NULL AFTER permissions;
      Continue with update (y/n) y
      Set log level to debug
      Checking whether the database schema can be updated (this can take a long time depending on the database size)
      Checked database schema update
      Checking updates of apps
      Checking whether the database schema for <files_sharing> can be updated (this can take a long time depending on the database size)
      Checking whether the database schema for <files_trashbin> can be updated (this can take a long time depending on the database size)
      Checked database schema update for apps
      Updating database schema
      Updated database
      Disabled 3rd-party app: files_videoviewer
      Updating <files_pdfviewer> …
      Updated <files_pdfviewer> to 0.8.1
      Updating <files_texteditor> …
      Updated <files_texteditor> to 2.1
      Updating <gallery> …
      Updated <gallery> to 14.5.0
      Updating <files> …
      Updated <files> to 1.4.4
      Updating <files_sharing> …
      Updated <files_sharing> to 0.9.1
      Updating <files_trashbin> …
      Updated <files_trashbin> to 0.8.0
      Updating <files_versions> …
      Updated <files_versions> to 1.2.0
      activity: An exception occurred while executing ‘CREATE TABLE `oc_activity` (`activity_id` INT AUTO_INCREMENT NOT NULL, `timestamp` INT DEFAULT 0 NOT NULL, `priority` INT DEFAULT 0 NOT NULL, `type` VARCHAR(255) DEFAULT NULL, `user` VARCHAR(64) DEFAULT NULL, `affecteduser` VARCHAR(64) NOT NULL, `app` VARCHAR(255) NOT NULL, `subject` VARCHAR(255) NOT NULL, `subjectparams` VARCHAR(4000) NOT NULL, `message` VARCHAR(255) DEFAULT NULL, `messageparams` VARCHAR(4000) DEFAULT NULL, `file` VARCHAR(4000) DEFAULT NULL, `link` VARCHAR(4000) DEFAULT NULL, `object_type` VARCHAR(255) DEFAULT NULL, `object_id` INT DEFAULT 0 NOT NULL, INDEX activity_time (`timestamp`), INDEX activity_user_time (`affecteduser`, `timestamp`), INDEX activity_filter_by (`affecteduser`, `user`, `timestamp`), INDEX activity_filter_app (`affecteduser`, `app`, `timestamp`), PRIMARY KEY(`activity_id`)) DEFAULT CHARACTER SET utf8 COLLATE utf8_bin ENGINE = InnoDB’:

      SQLSTATE[42S01]: Base table or view already exists: 1050 Table ‘oc_activity’ already exists
      Starting code integrity check…
      Finished code integrity check
      Update successful
      Maintenance mode is kept active
      Reset log level

    • Malgré l’erreur la vérification est OK
  • PUIS Passage en 9.1 (repo stable !)

    • Mettre à jour le repo

      https://download.owncloud.org/download/repositories/stable/owncloud/
      notamment avec
      deb http://download.owncloud.org/download/repositories/stable.backup/Debian_7.0/ /
      dans /etc/apt/sources.list.d/owncloud.list
      puis en ayant validé la clé GPG faire un update/ upgrade

      EDIT : attention le dépôt est passé de stable à stable.backup pour Debian 7 !

    • Upgrade occ en ligne de commande

      root@serveur:/var/www/owncloud# sudo -u www-data php occ upgradeChecking whether the database schema for <notifications> can be updated (this can take a long time depending on the database size)
      Done
      1/1 [============================] 100%
      Checked database schema update for apps
      Updating database schema
      Updated database
      Updating <federatedfilesharing> …
      Updated <federatedfilesharing> to 0.3.0
      Updating <gallery> …
      Updated <gallery> to 15.0.0
      Updating <provisioning_api> …
      Updated <provisioning_api> to 0.5.0
      Updating <updatenotification> …
      Updated <updatenotification> to 0.2.1
      Updating <federation> …
      Updated <federation> to 0.1.0
      Updating <files> …
      Updated <files> to 1.5.1
      Updating <dav> …
      Fix classification for calendar objects
      Done
      0/0 [>—————————]   0%
      Updated <dav> to 0.2.7
      Updating <files_sharing> …
      Updated <files_sharing> to 0.10.0
      Updating <files_trashbin> …
      Updated <files_trashbin> to 0.9.0
      Updating <files_versions> …
      Updated <files_versions> to 1.3.0
      Updating <comments> …
      Updated <comments> to 0.3.0
      Updating <notifications> …
      Updated <notifications> to 0.3.0
      Updating <systemtags> …
      Updated <systemtags> to 0.3.0
      activity: An exception occurred while executing ‘CREATE TABLE `oc_activity` (`activity_id` INT AUTO_INCREMENT NOT NULL, `timestamp` INT DEFAULT 0 NOT NULL, `priority` INT DEFAULT 0 NOT NULL, `type` VARCHAR(255) DEFAULT NULL, `user` VARCHAR(64) DEFAULT NULL, `affecteduser` VARCHAR(64) NOT NULL, `app` VARCHAR(255) NOT NULL, `subject` VARCHAR(255) NOT NULL, `subjectparams` VARCHAR(4000) NOT NULL, `message` VARCHAR(255) DEFAULT NULL, `messageparams` VARCHAR(4000) DEFAULT NULL, `file` VARCHAR(4000) DEFAULT NULL, `link` VARCHAR(4000) DEFAULT NULL, `object_type` VARCHAR(255) DEFAULT NULL, `object_id` INT DEFAULT 0 NOT NULL, INDEX activity_time (`timestamp`), INDEX activity_user_time (`affecteduser`, `timestamp`), INDEX activity_filter_by (`affecteduser`, `user`, `timestamp`), INDEX activity_filter_app (`affecteduser`, `app`, `timestamp`), INDEX activity_object (`object_type`, `object_id`), PRIMARY KEY(`activity_id`)) DEFAULT CHARACTER SET utf8 COLLATE utf8_bin ENGINE = InnoDB’:SQLSTATE[42S01]: Base table or view already exists: 1050 Table ‘oc_activity’ already exists
      Drop old database tables
      Done
      28/28 [============================] 100%
      Remove old (< 9.0) calendar/contact shares
      Done
      4/4 [============================] 100%
      Fix permissions so avatars can be stored again
      Done
      2/2 [============================] 100%
      Starting code integrity check…
      Finished code integrity check
      Update successful
      Maintenance mode is kept active
      Reset log level

    • Sortie du mode maintenance OwnCloud

      root@mail:/var/www/owncloud# sudo -u www-data php occ maintenance:mode –off
      ownCloud is in maintenance mode – no app have been loaded
      Maintenance mode disable

    • Et après et enfin on vérifie l’interface web et le service et les erreurs éventuelles :
      cf https://doc.owncloud.org/server/9.1/admin_manual/configuration_server/security_setup_warnings.html
      notamment https://doc.owncloud.org/server/9.1/admin_manual/configuration_server/harden_server.html#enable-hsts-label

Autre lien à mettre dans les favori : Commande Outil de maintenance  Owncloud

Extrait de /etc/apt/sources.list.d/owncloud.list à la fin de toutes les étapes

#https://download.owncloud.org/download/repositories/stable/owncloud/
#9.1 and future
deb http://download.owncloud.org/download/repositories/stable.backup/Debian_7.0/ /

#https://download.owncloud.org/download/repositories/9.0/owncloud/
#9.0
#deb http://download.owncloud.org/download/repositories/9.0/Debian_7.0/ /

#https://download.owncloud.org/download/repositories/8.2/owncloud/
#8.2
#deb http://download.owncloud.org/download/repositories/8.2/Debian_7.0/ /

#old <8.1
#cf https://doc.owncloud.org/server/8.1/admin_manual/maintenance/package_upgrade.html
#deb http://download.opensuse.org/repositories/isv:ownCloud:community/Debian_7.0/ /

Vous voilà avec le repo. à jour pour avoir Owncloud installé par paquet officiel OwnCloud sur votre Debian 7
(même procédure pour Debian 8 avec repo liés)

Prochaine étape : tester la killing feature de la version 9 de Owncloud avec la notion de stockage Externe !
https://doc.owncloud.org/server/9.0/admin_manual/configuration_files/external_storage_configuration_gui.html

Publié le mai 11, 2017 par sdubois. Cet article a été publié dans TIC/Sysadmin. Enregistrer le lien de l'article.
Pourquoi venir (edit : être venu) au Libday ?
Arrêt du support de sécurité LTS de Debian Wheezy (Debian 7) en mai 2018

Un commentaire sur “Passage de OwnCloud 8.1.9 (paquets OpenSuse) à 9.1.5 (paquets officiels OwnCloud pour Debian ) / Cas Debian 7”

  1. Ping : Migration de OwnCloud (9.1.6) à NextCloud (10.0.6) sur Debian 7 ! |

Laisser un commentaire Annuler la réponse

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

    Articles récents

    • Compte rendu sur l’évènement Smile x AWS : Digitalisation d’un club de foot : l’expérience réussie de l’OM janvier 11, 2024
    • 20 ans de Medinsoft dont 10 ans avec Libertis ! septembre 19, 2023
    • Upgrade du driver Epson suite passage de Debian Stretch à Buster et dysfonctionnement juillet 8, 2020
    • Ajouter SpamAssassin à son installation Bluemind mars 2, 2020
    • Lettre ouverte : Le Libre n’attire plus … l’Open source est devenu “trop” rentable … Attention danger ! mai 24, 2019

    Archives

    Catégories

    • alter way (5)
    • Libertis (14)
    • TIC/Sysadmin (72)

Follow me on Twitter

Tweets by @sebfox

Archives

Recherche par Mots clés

Motorisé par