Herramientas de usuario

Herramientas del sitio


unattended_installations:installation_icinga_2

Enlace a la vista de comparación

Ambos lados, revisión anteriorRevisión previa
Próxima revisión
Revisión previa
unattended_installations:installation_icinga_2 [2015/04/01 23:56] – [Setting up Icinga Web 2] machounattended_installations:installation_icinga_2 [2022/11/02 17:58] (actual) – editor externo 127.0.0.1
Línea 65: Línea 65:
   # apt-get install mysql-server mysql-client   # apt-get install mysql-server mysql-client
 **Installing the IDO modules for MySQL**   **Installing the IDO modules for MySQL**  
 +
 +The next step is to install the **icinga2-ido-mysql** package using your distribution's package manager.
 +  # apt-get install icinga2-ido-mysql
 +
 + ** Note**
 +  The Debian/Ubuntu packages provide a database configuration wizard by default. 
 +  You can skip the automated setup and install/upgrade the database manually if you prefer that.
 +**Setting up the MySQL database**
 +
 +Set up a MySQL database for Icinga 2:
 +  # mysql -u root -p
 +  mysql>  CREATE DATABASE icinga;
 +  GRANT SELECT, INSERT, UPDATE, DELETE, DROP, CREATE VIEW, INDEX, EXECUTE ON icinga.* TO 'icinga'@'localhost' IDENTIFIED BY 'icinga';
 +  mysql> exit
 +After creating the database you can import the Icinga 2 IDO schema using the following command:
 +  # mysql -u root -p icinga < /usr/share/icinga2-ido-mysql/schema/mysql.sql
 +The mysql.sql not contain the table structure to store users and preferences, so inside the database icinga have to create that structure  to prevent errors when the configuration via web.
 +  CREATE TABLE `icingaweb_group`(
 +  `name` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
 +  `parent` varchar(64) COLLATE utf8_unicode_ci NULL DEFAULT NULL,
 +  `ctime` timestamp NULL DEFAULT NULL,
 +  `mtime` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
 +  PRIMARY KEY (`name`)
 +  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 +  
 +  CREATE TABLE `icingaweb_group_membership`(
 +  `group_name` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
 +  `username` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
 +  `ctime` timestamp NULL DEFAULT NULL,
 +  `mtime` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
 +  PRIMARY KEY (`group_name`,`username`),
 +  CONSTRAINT `fk_icingaweb_group_membership_icingaweb_group` FOREIGN KEY (`group_name`)
 +  REFERENCES `icingaweb_group` (`name`)
 +  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 +  
 +  CREATE TABLE `icingaweb_user`(
 +  `name` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
 +  `active` tinyint(1) NOT NULL,
 +  `password_hash` varbinary(255) NOT NULL,
 +  `ctime` timestamp NULL DEFAULT NULL,
 +  `mtime` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
 +  PRIMARY KEY (`name`)
 +  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 +  
 +  CREATE TABLE `icingaweb_user_preference`(
 +  `username` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
 +  `section` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
 +  `name` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
 +  `value` varchar(255) NOT NULL,
 +  `ctime` timestamp NULL DEFAULT NULL,
 +  `mtime` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, 
 +  PRIMARY KEY (`username`,`section`,`name`)
 +  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 +
 +**Enabling the IDO MySQL module** 
 +
 +The package provides a new configuration file that is installed in **/etc/icinga2/features-available/ido-mysql.conf**. You will need to update the database credentials in this file.
 +
 +You can enable the **ido-mysql** feature configuration file using **icinga2 feature enable:**
 +  # icinga2 feature enable ido-mysql
 +  Module 'ido-mysql' was enabled.
 +  Make sure to restart Icinga 2 for these changes to take effect.
 +  # service icinga2 restart
 +**Webserver**
 +  # apt-get install apache2
 +**Setting Up External Command Pipe**
 +  # icinga2 feature enable command
 +  # service icinga2 restart
 +By default the command pipe file is owned by the group **icingacmd** with read/write permissions. Add your webserver's user to the group **icingacmd** to enable sending commands to Icinga 2 through your web interface:
 +  # usermod -a -G icingacmd www-data
 +[[Installing up Icinga Web 2]]
unattended_installations/installation_icinga_2.1427932593.txt.gz · Última modificación: 2022/11/02 17:58 (editor externo)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki