Voici la doc d'upgrade d'Alternc sur nos serveurs.

historique

Une fois la mise à jour terminé ne pas oublier de tester.

MAJ 3.3.11 (stretch) -> 3.5pre

En date du 27 mai 2019! 29971 Note, on vise l'intégration à puppet4 après la maj.

  1. Vérifier les configurations de debconf de votre alternc. Ça va vous aider si jamais puppet écrase certaines configurations.
    • # debconf-get-selections | grep alternc > /root/MAJalternc-debconfsetting.txt
      # cat !$
  2. rouler alternc.install et raccorder les changements au templates
  3. Avant de partir analyser le setup de vhost d'AlternC
    •  MariaDB [alternc]> select count(0), type from sub_domaines group by type; 
  4. installer alternc-ssl (sinon, alternc3.5 va dire que certains table comme alternc.certificates n'existe pas)
  5. stop puppet : puppet agent --disable
  6. sources de koumbit dépot alternc35 : http://debian.koumbit.net/debian/dists/alternc35/ :

         echo 'deb http://debian.koumbit.net/debian alternc35 main' > /etc/apt/sources.list.d/alternc35.list
         apt update
    • enlèver les sources d'upstream ou de 3.3 de kt
  7. faire un backup de la base de données :

         mysqldump alternc > "/root/alternc-pre-upgrade-`date +%F`.sql"
  8. update les packages :

        apt remove alternc-ssl
    • Retirer la cron-job qui n'est pas supprimé quand on supprime le package.
      •  rm /etc/cron.d/alternc-ssl  

        apt upgrade alternc alternc-roundcube alternc-mailman
  9. mettre la ligne (sans quotes) ALTERNC_REQUEST_CERTIFICATES=system dans /etc/alternc/local.sh

    • Ceci fera un sort que alternc-certificate-provider-letsencrypt demande seulement les certificats de système lors d'alternc.install
  10. assurer que les variables fqdn_dovecot, etc. sont correcte dans le système :

         update variable set value = 'mail.<domaine>' where name in ('fqdn_postfix', 'fqdn_dovecot');
         update variable set value = 'ftp.<domaine>' where name = 'fqdn_proftpd';
         update variable set value = 'listes.<domaine>' where name = 'mailman_url';
  11. rouler alternc.install
    • erreur

              Running upgrade script 3.5.0.1.sql                                                                                                                                   │·············································
      ERROR 1146 (42S02) at line 23: Table 'alternc.certificates' doesn't exist                                                                                            │·············································
      ERROR 1146 (42S02) at line 41: Table 'alternc.certif_hosts' doesn't exist                                                                                            │·············································
      ERROR 1062 (23000) at line 69: Duplicate entry 'fqdn_dovecot' for key 'PRIMARY'                                                                                      │·············································
      ERROR 1062 (23000) at line 73: Duplicate entry 'fqdn_postfix' for key 'PRIMARY'                                                                                      │·············································
      ERROR 1062 (23000) at line 77: Duplicate entry 'fqdn_proftpd' for key 'PRIMARY'
              Running upgrade script 3.5.0.2.sql                                                                                                                                   │·············································
      ERROR 1064 (42000) at line 3: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near│·············································
       'UPDATE alternc_status SET value='3.5.0.2.sql' WHERE name='alternc_version'' at line 5                                                                              │·············································
      Running upgrade script 3.5.0.3.sql                                                                                                                                   │·············································
      ERROR 1071 (42000) at line 3: Specified key was too long; max key length is 1000 bytes 
      
      alter table sub_domaines drop index compte;
      alter table sub_domaines modify column valeur VARCHAR(1024);
  12. débogguer ce bris
    1. remplace webmail CNAME avec roundcube webmail access

MAJ d'alternc de wheezy à stretch

En 2017/2018, nous avons mis à jour alternc dans le cadre de mise à jour des systèmes d'exploitation.


CategoryInstallAlternc

AlterncUpgrade (last edited 2020-05-09 14:12:44 by sebas)