Changes

From SME Server
Jump to navigationJump to search
412 bytes added ,  21:47, 11 September 2023
no edit summary
Line 368: Line 368:  
echo "SELECT CONCAT('ALTER TABLE ',TABLE_NAME,' ENGINE=InnoDB;')  FROM INFORMATION_SCHEMA.TABLES WHERE ENGINE='MyISAM' AND table_schema = 'zabbixdb';" |mysql105 -s|mysql105 zabbixdb
 
echo "SELECT CONCAT('ALTER TABLE ',TABLE_NAME,' ENGINE=InnoDB;')  FROM INFORMATION_SCHEMA.TABLES WHERE ENGINE='MyISAM' AND table_schema = 'zabbixdb';" |mysql105 -s|mysql105 zabbixdb
 
</syntaxhighlight>
 
</syntaxhighlight>
* corriger le classement, pour le problème "[Z3005] query failed: [1071] Specified key was too long; max key length is 3072 bytes [create index items_1 on items (hostid,key_(1021))]" [https://www.zabbix.com/forum/zabbix-troubleshooting-and-problems/401826-database-upgrade-failed-specified-key-was-too-long-max-key-length-is-3072-bytes see here.]<syntaxhighlight lang="bash">
+
* corriger le classement, pour le problème "[Z3005] query failed: [1071] Specified key was too long; max key length is 3072 bytes [create index items_1 on items (hostid,key_(1021))]" [https://www.zabbix.com/forum/zabbix-troubleshooting-and-problems/401826-database-upgrade-failed-specified-key-was-too-long-max-key-length-is-3072-bytes voir ici.]<syntaxhighlight lang="bash">
 
echo "SELECT CONCAT('ALTER TABLE ',TABLE_SCHEMA,'.',TABLE_NAME,' CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;') FROM information_schema.TABLES WHERE TABLE_SCHEMA = 'zabbixdb';" |mysql105 -s |mysql10
 
echo "SELECT CONCAT('ALTER TABLE ',TABLE_SCHEMA,'.',TABLE_NAME,' CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;') FROM information_schema.TABLES WHERE TABLE_SCHEMA = 'zabbixdb';" |mysql105 -s |mysql10
 
</syntaxhighlight>
 
</syntaxhighlight>
* fix the table with database/mysql/double.sql<syntaxhighlight lang="mysql">
+
* réparer la table avec database/mysql/double.sql<syntaxhighlight lang="mysql">
 
cat /usr/share/doc/zabbix-server-mysql-5.0.30/double.sql |mysql105 `config getprop zabbix-server DbName`
 
cat /usr/share/doc/zabbix-server-mysql-5.0.30/double.sql |mysql105 `config getprop zabbix-server DbName`
 
</syntaxhighlight>
 
</syntaxhighlight>
* fix the  foreign key for the issue "[Z3005] query failed: [1091] Can't DROP FOREIGN KEY `c_items_1`; check that it exists [alter table items drop foreign key c_items_1]" [https://www.zabbix.com/forum/zabbix-troubleshooting-and-problems/402412-zabbix-4-4-8-to-5-0-upgrade-failure see here]<syntaxhighlight lang="bash">
+
* corriger la clé étrangère pour le problème "[Z3005] query failed: [1091] Can't DROP FOREIGN KEY `c_items_1`; check that it exists [alter table items drop foreign key c_items_1]" [https://www.zabbix.com/forum/zabbix-troubleshooting-and-problems/402412-zabbix-4-4-8-to-5-0-upgrade-failure voir ici.]<syntaxhighlight lang="bash">
 
echo "ALTER TABLE items ADD CONSTRAINT c_items_1 FOREIGN KEY (hostid) REFERENCES hosts (hostid) ON DELETE CASCADE;
 
echo "ALTER TABLE items ADD CONSTRAINT c_items_1 FOREIGN KEY (hostid) REFERENCES hosts (hostid) ON DELETE CASCADE;
 
CREATE INDEX items_1 ON items (hostid);" |mysql105 zabbixdb
 
CREATE INDEX items_1 ON items (hostid);" |mysql105 zabbixdb
 
</syntaxhighlight>
 
</syntaxhighlight>
   −
* install 5.0 using rpms<syntaxhighlight lang="bash">
+
* installer 5.0 en tilisant les paquets :<syntaxhighlight lang="bash">
 
db yum_repositories setprop zabbix44 status disabled
 
db yum_repositories setprop zabbix44 status disabled
 
db yum_repositories setprop zabbix50 status enabled
 
db yum_repositories setprop zabbix50 status enabled
Line 387: Line 387:  
yum install smeserver-zabbix-server-z50 --enablerepo=smecontribs,smetest,smedev
 
yum install smeserver-zabbix-server-z50 --enablerepo=smecontribs,smetest,smedev
 
</syntaxhighlight>
 
</syntaxhighlight>
** fix collation after install
+
* réparer le classement après l'installation
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
echo "alter database $(config getprop zabbix-server DbName) character set utf8mb4 collate utf8mb4_bin;" |mysql105
 
echo "alter database $(config getprop zabbix-server DbName) character set utf8mb4 collate utf8mb4_bin;" |mysql105
Line 399: Line 399:  
</syntaxhighlight>
 
</syntaxhighlight>
   −
=== Migrate DB from mariadb 5.5. to mariadb 10.5 ===
+
=== Migrer la base de données de mariadb 5.5 à mariadb 10.5 ===
The script will check if zabbixdb is present in mariadb 5.5. path, as long as it is it will keep using this db, even if one is present in mariadb 10.5.<syntaxhighlight lang="bash">
+
Le script vérifiera si zabbixdb est présent dans le répertoire de mariadb 5.5 ; tant qu'il l'est, il continuera à utiliser cette base de données, même si elle est présente dans mariadb 10.5.<syntaxhighlight lang="bash">
# need testing, writing inspired from Nextcloud contrib page
+
# test nécessaire, écrire faite à partir de la page de la contribution de Nextcloud.
 
mysqldump `config getprop zabbix-server DbName` > zabbixdb.sql
 
mysqldump `config getprop zabbix-server DbName` > zabbixdb.sql
 
echo "CREATE DATABASE IF NOT EXISTS `config getprop zabbix-server DbName` CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;"| mysql105
 
echo "CREATE DATABASE IF NOT EXISTS `config getprop zabbix-server DbName` CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;"| mysql105
Line 411: Line 411:  
echo "drop database `config getprop zabbix-server DbName`;" |mysql
 
echo "drop database `config getprop zabbix-server DbName`;" |mysql
 
signal-event smeserver-zabbix-server-update
 
signal-event smeserver-zabbix-server-update
</syntaxhighlight>{{Warning box|These lines of code need to be tested first, try on a test environment and be prepared to restore a backup of your db.}}
+
</syntaxhighlight>
 +
{{Warning box|type=Attention : |ces lignes de code nécessitent d'être testées au préalable ; essayez sur un environment de test et soyez prêt(e) à restaurer une sauvegarde de votre base de données.}}
 +
 
 +
=== Bogues ===
 +
Veuillez ouvrir les bogues dans la section SME-Contribs dans [http://bugs.contribs.org/enter_bug.cgi bugzilla] et sélectionner le composant smeserver-zabbix-server ou utiliser {{BugzillaFileBug|product=SME%20Contribs|component=smeserver-zabbix-server|title=ce lien.}}
 +
 
 +
Un aperçu des problèmes actuels de cette contribution figure ci-dessous :{{#bugzilla:columns=id,product,version,status,summary|sort=id|order=desc|component=smeserver-zabbix-server |noresultsmessage=Pas trouvé de bogues ouverts.}}
 +
 
 +
===Journal des modifications===
 +
Seules les versions publiées dans le dépôt smecontrib sont listées ici.
 +
 
 +
{{#smechangelog: smeserver-zabbix-server }}
      −
=== Bogues ===
  −
Merci de faire parvenir les problèmes à SME-Contribs sur [http://bugs.contribs.org/enter_bug.cgi bugzilla]
  −
en sélectionnant le logiciel  smeserver-zabbix ou en utilisant un de ces liens :
     −
{{BugzillaFileBug|product=SME%20Contribs|component=smeserver-zabbix-server|title=server}}{{BugzillaFileBug|product=SME%20Contribs|component=smeserver-zabbix-agent|title=agent}}{{BugzillaFileBug|product=SME%20Contribs|component=smeserver-zabbix-proxy|title=proxy}}
      
----
 
----
 
[[Category: Contrib/fr]] [[Category: Administration:Monitoring]]
 
[[Category: Contrib/fr]] [[Category: Administration:Monitoring]]
3,054

edits

Navigation menu