{"id":140,"date":"2022-01-20T13:25:08","date_gmt":"2022-01-20T12:25:08","guid":{"rendered":"https:\/\/whoami.lausitz-event.info\/?p=140"},"modified":"2023-05-16T12:58:18","modified_gmt":"2023-05-16T10:58:18","slug":"installation-konfiguration-icinga2-unter-rockylinux-8-x","status":"publish","type":"post","link":"https:\/\/whoami.lausitz-event.info\/?p=140","title":{"rendered":"Installation &#038; Konfiguration Icinga2 unter RockyLinux 8.x"},"content":{"rendered":"\n\n<p><strong>Systemvoraussetzungen<\/strong><\/p>\n\n\n\n\n\n<pre class=\"wp-block-code\"><code>RockyLinux 8.5\nIcinga 2.13.2<\/code><\/pre>\n\n\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>OS relevante Konfigurationen<\/strong><\/li>\n<\/ol>\n\n\n\n\n\n<p>Abschalten SELinux \/etc\/sysconfig\/selinux<\/p>\n\n\n\n\n\n<pre class=\"wp-block-code\"><code>SELINUX=disabled<\/code><\/pre>\n\n\n\n\n\n<p>Nach erfolgter Installation sollte ein Systemupdate gestartet werden<\/p>\n\n\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@localhost ~]#dnf -y update<\/code><\/pre>\n\n\n\n\n\n<p>Deaktivieren der Firewall<\/p>\n\n\n\n\n\n<pre class=\"wp-block-code\"><code>\n&#91;root@icinga ~]#systemctl disable firewalld<\/code><\/pre>\n\n\n\n\n\n<p>Modifizieren der Hostdatei -&gt; Eintrag des Icinga2 FQDN + IP-Adresse in der \/etc\/hosts<\/p>\n\n\n\n\n\n<pre class=\"wp-block-code\"><code>192.17.10.10    icinga.work.intra icinga<\/code><\/pre>\n\n\n\n\n\n<p>Installation Zusatzpakete - Aktivierung Repository RockyPowerTools \/etc\/yum.repos.d\/Rocky-PowerTools.repo<\/p>\n\n\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;PowerTools]\n...\nenabled=1<\/code><\/pre>\n\n\n\n\n\n<p>Installation Epel Repository<\/p>\n\n\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@icinga ~]dnf -y install https:\/\/dl.fedoraproject.org\/pub\/epel\/epel-release-latest-8.noarch.rpm<\/code><\/pre>\n\n\n\n\n\n<p>Installation zus\u00e4tzlicher Pakete<\/p>\n\n\n\n\n\n<pre class=\"wp-block-code\"><code>dnf -y install php php-common php-fpm php-cli php-devel php-xml php-json php-pear php-intl php-dba php-pdo php-soap php-mysqlnd php-gd php-snmp php-mbstring php-pecl-zip php-pear-Date php-pear-Mail php-pear-Net-URL compat-openssl10 libnsl php-gmp ntfs-3g\n\ndnf -y install  ftp:\/\/ftp.pbone.net\/mirror\/archive.fedoraproject.org\/fedora\/linux\/releases\/28\/Everything\/x86_64\/os\/Packages\/p\/perl-Filesys-SmbClient-3.2-15.fc28.x86_64.rpm\ndnf -y install  perl-Time-Duration\ndnf -y install nagios-plugins-*\ndnf -y install rsync git wget expect ruby-devel ant texlive\ndnf -y groupinstall \"Development Tools\"\ndnf -y install ImageMagick ImageMagick-perl ImageMagick-libs ImageMagick-devel\ndnf -y install https:\/\/packages.icinga.com\/epel\/icinga-rpm-release-8-latest.noarch.rpm\ndnf -y install icinga2 icinga2-ido-mysql cpan libzip\ndnf -y install python3.8<\/code><\/pre>\n\n\n\n\n\n<p>Update PHP auf Version 7.3<\/p>\n\n\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@icinga~ ]dnf module list php\n&#91;root@icinga~ ]dnf module -y reset php\n&#91;root@icinga~ ]dnf module -y enable php:7.3\n&#91;root@icinga~ ]dnf module -y install php:7.3\/common  \n&#91;root@icinga~ ]php -v<\/code><\/pre>\n\n\n\n\n\n<p>Install Imagick<\/p>\n\n\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@icinga~ ]pecl install imagick<\/code><\/pre>\n\n\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@icinga~ ]perl -MCPAN -e shell;\ninstall LWP\ninstall JSON\ninstall Time::Piece\ninstall LWP::Protocol::https\ninstall List::Compare<\/code><\/pre>\n\n\n\n\n\n<pre class=\"wp-block-code\"><code>pip3.8 install pysnmp<\/code><\/pre>\n\n\n\n\n\n<p>Webserver f\u00fcr den automatischen Start konfigurieren<\/p>\n\n\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl enable httpd\nsystemctl start httpd\nsystemctl status httpd\nusermod -a -G icingacmd apache<\/code><\/pre>\n\n\n\n\n\n<p><strong>2. MySQL Datenbank MariaDB<\/strong><\/p>\n\n\n\n\n\n<pre class=\"wp-block-code\"><code>dnf -y install mariadb mariadb-server mariadb-common\nsystemctl enable mariadb\nsystemctl start mariadb\nsystemctl status mariadb<\/code><\/pre>\n\n\n\n\n\n<p>Setzen eines sicheren Passwortes f\u00fcr die MySQL DB<\/p>\n\n\n\n\n\n<pre class=\"wp-block-code\"><code>mysqladmin -u root password \"SECURE_PASSWORD\"<\/code><\/pre>\n\n\n\n\n\n<p>Performance Tuning MariaDB \/etc\/my.cnf.d\/mariadb-server.cnf<\/p>\n\n\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;mysqld]\nquery_cache_limit  = 16M\nquery_cache_size  = 128M\nquery_cache_type = 1\ntmp_table_size= 960M\nmax_heap_table_size= 830M\nperformance_schema = ON\ninnodb_log_file_size = 16M\ninnodb_buffer_pool_instances = 1\nmax_allowed_packet=500M<\/code><\/pre>\n\n\n\n\n\n<p>Performance Tuning Limits erh\u00f6hen \/root\/.bashrc<\/p>\n\n\n\n\n\n<pre class=\"wp-block-code\"><code>ulimit -n 90000<\/code><\/pre>\n\n\n\n\n\n<p> Performance Tuning Filesystem \/etc\/fstab<\/p>\n\n\n\n\n\n<pre class=\"wp-block-code\"><code>\/dev\/mapper\/cl-var      \/var                    ext4    defaults,<strong>noatime<\/strong>        1 2<\/code><\/pre>\n\n\n\n\n\n<p>Enable Icinga2 Features<\/p>\n\n\n\n\n\n<pre class=\"wp-block-code\"><code>icinga2 feature enable statusdata\nicinga2 feature enable livestatus\nicinga2 feature enable syslog\nicinga2 feature enable ido-mysql\nicinga2 feature enable command\nsystemctl enable icinga2\nsystemctl start icinga2\nsystemctl status icinga2<\/code><\/pre>\n\n\n\n\n\n<p>Konfiguration Icingadb Datenbank<\/p>\n\n\n\n\n\n<pre class=\"wp-block-code\"><code>mysql -u root -pPASSWORD -e \"create database icingadb;\"\nmysql -u root -pPASSWORD -e \"GRANT ALL ON icingadb.* TO 'icinga'@'localhost' IDENTIFIED BY 'icinga';\"\nmysql -u root -pPASSWORD icingadb &lt; \/usr\/share\/icinga2-ido-mysql\/schema\/mysql.sql<\/code><\/pre>\n\n\n\n\n\n<p>IDO-MySQL Konfiguration<\/p>\n\n\n\n\n\n<pre class=\"wp-block-code\"><code>cat > \/etc\/icinga2\/features-available\/ido-mysql.conf &lt;&lt;EOF\n\/**\n * The db_ido_mysql library implements IDO functionality\n * for MySQL.\n *\/\n\nlibrary \"db_ido_mysql\"\n\nobject IdoMysqlConnection \"ido-mysql\" {\n  user = \"icinga\"\n  password = \"icinga\"\n  host = \"localhost\"\n  database = \"icingadb\"\n  cleanup = {\n   acknowledgements_age = 90d\n   commenthistory_age = 90d\n   contactnotifications_age = 90d\n   contactnotificationmethods_age = 90d\n   downtimehistory_age = 90d\n   eventhandlers_age = 90d\n   externalcommands_age = 90d\n   flappinghistory_age = 90d\n   hostchecks_age = 90d\n   logentries_age = 90d\n   notifications_age = 90d\n   processevents_age = 90d\n   statehistory_age = 90d\n   servicechecks_age = 90d\n   systemcommands_age = 90d\n  }\n}\nEOF<\/code><\/pre>\n\n\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl restart icinga2\nsystemctl status icinga2<\/code><\/pre>\n\n\n","protected":false},"excerpt":{"rendered":"<p>Systemvoraussetzungen Abschalten SELinux \/etc\/sysconfig\/selinux Nach erfolgter Installation sollte ein Systemupdate gestartet werden Deaktivieren der Firewall Modifizieren der Hostdatei -&gt; Eintrag des Icinga2 FQDN + IP-Adresse in der \/etc\/hosts Installation Zusatzpakete - Aktivierung Repository RockyPowerTools \/etc\/yum.repos.d\/Rocky-PowerTools.repo Installation Epel Repository Installation zus\u00e4tzlicher Pakete Update PHP auf Version 7.3 Install Imagick Webserver f\u00fcr den automatischen Start konfigurieren 2. [&hellip;]<\/p>","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[9],"tags":[],"class_list":["post-140","post","type-post","status-publish","format-standard","hentry","category-icinga"],"_links":{"self":[{"href":"https:\/\/whoami.lausitz-event.info\/index.php?rest_route=\/wp\/v2\/posts\/140","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/whoami.lausitz-event.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/whoami.lausitz-event.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/whoami.lausitz-event.info\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/whoami.lausitz-event.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=140"}],"version-history":[{"count":21,"href":"https:\/\/whoami.lausitz-event.info\/index.php?rest_route=\/wp\/v2\/posts\/140\/revisions"}],"predecessor-version":[{"id":365,"href":"https:\/\/whoami.lausitz-event.info\/index.php?rest_route=\/wp\/v2\/posts\/140\/revisions\/365"}],"wp:attachment":[{"href":"https:\/\/whoami.lausitz-event.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=140"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/whoami.lausitz-event.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=140"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/whoami.lausitz-event.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=140"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}