Icinga 2 入门: 安装和配置

安装repo

For Centos 8:

dnf -y install https://packages.icinga.com/epel/icinga-rpm-release-8-latest.noarch.rpm

CentOS 8 additionally needs the PowerTools repository for EPEL:

dnf -y install 'dnf-command(config-manager)'
dnf config-manager --set-enabled PowerTools
dnf -y install epel-release

安装Icinga 2

dnf -y install icinga2
systemctl enable icinga2
systemctl start icinga2

配置plugins

dnf install nagios-plugins-all

安装Icinga Web 2

DB (Postgresql)
dnf -y install postgresql-server postgresql
postgresql-setup initdb
systemctl enable postgresql
systemctl start postgresql
icinga for postgresql

Installing the IDO modules for PostgreSQL

dnf -y install icinga2-ido-pgsql

Set up a PostgreSQL database for Icinga 2:

cd /tmp
sudo -u postgres psql -c "CREATE ROLE icinga WITH LOGIN PASSWORD 'icinga'"
sudo -u postgres createdb -O icinga -E UTF8 icinga

vim /var/lib/pgsql/data/pg_hba.conf

# icinga
local   icinga      icinga                            md5
host    icinga      icinga      127.0.0.1/32          md5
host    icinga      icinga      ::1/128               md5

# "local" is for Unix domain socket connections only
local   all         all                               ident
# IPv4 local connections:
host    all         all         127.0.0.1/32          ident
# IPv6 local connections:
host    all         all         ::1/128               ident
systemctl restart postgresql
export PGPASSWORD=icinga
psql -U icinga -d icinga < /usr/share/icinga2-ido-pgsql/schema/pgsql.sql

Enabling the IDO PostgreSQL module

icinga2 feature enable ido-pgsql
systemctl restart icinga2
Web server
dnf -y install httpd
systemctl enable httpd
systemctl start httpd
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值