]> granicus.if.org Git - icinga2/commitdiff
Documentation: Update ido installation.
authorMichael Friedrich <michael.friedrich@netways.de>
Fri, 11 Oct 2013 13:34:30 +0000 (15:34 +0200)
committerMichael Friedrich <michael.friedrich@netways.de>
Fri, 11 Oct 2013 13:39:44 +0000 (15:39 +0200)
doc/2.4-setting-up-ido.md

index 5f1334735bf631342cd70646c224a6a942fcc77c..0f1f8fee472418e63ec4335dc8159f4eda8ae9a1 100644 (file)
@@ -7,6 +7,11 @@ by a number of projects including Icinga Web.
 There is a separate module for each database back-end. At present only support
 for MySQL is implemented.
 
+> **Note**
+>
+> Icinga 2 uses the Icinga 1.x IDOUtils database schema starting with version
+> `1.10.0`
+
 ### Setting up the database
 
 First of all you have to create a database for Icinga 2:
@@ -32,7 +37,36 @@ First of all you have to create a database for Icinga 2:
 After creating the database you can import the Icinga 2 IDO schema using the
 following command:
 
-    # mysql -u root -p icinga < /path/to/icinga-src/components/db_ido_mysql/schema/mysql.sql
+    # mysql -u root -p icinga < /usr/share/doc/icinga2-ido-mysql-*/schema/mysql.sql
+
+> **Note**
+>
+> The Icinga 2 rpm packages install the schema files into `/usr/share/doc/icinga2-ido-mysql-*/schema`.
+> The Icinga 2 tarball ships the schema files in `components/db_ido_mysql/schema/`.
+
+### Upgrading the database
+
+If the database has been installed and requires an upgrade, verify the current
+schema version first:
+
+    # mysql -u root -p icinga -e 'SELECT version FROM icinga_dbversion;'
+    +---------+
+    | version |
+    +---------+
+    | 1.10.0  |
+    +---------+
+
+Check the `schema/upgrade` directory for an incremental schema upgrade file, e.g.
+if your database schema version is `1.10.0` look for `mysql-upgrade-1.11.0.sql`
+and newer.
+Apply all database schema upgrade files incrementially.
+
+    # mysql -u root -p icinga < /usr/share/doc/icinga2-ido-mysql-*/schema/upgrade/mysql-upgrade-1.11.0.sql
+
+> **Note**
+>
+> The Icinga 2 IDO module will check for the required database schema version
+> on startup and generate an error message if not satisfied.
 
 ### Installing the IDO module