icinga2+postgresql

icinga2+postgresql,第1张

概述icinga2+postgresql postgresql10下载网址: http://download.postgresql.org/pub/repos/yum/testing/10/redhat/rhel-6-x86_64/ 需先下载postgresql10-10.0、postgresql10-server、postgres10-contrib、postgresql10-libs、icinga

icinga2+postgresql


postgresql10下载网址:

http://download.postgresql.org/pub/repos/yum/testing/10/redhat/rhel-6-x86_64/



需先下载postgresql10-10.0、postgresql10-server、postgrES10-contrib、postgresql10-libs、icinga2-IDo-pgsql


安装rpm -i 略(提示有依赖可以--nodeps),redhat postgresql的安装路径为/var/lib/pgsql/10/data


# rsync -av /usr/pgsql-10/bin/* /usr/bin/


创建账号和数据库:


# /etc/init.d/postgresql-10 initdb

# /etc/init.d/postgresql-10 start

# su - postgres

$ psql

# create user "icinga2" with password 'xxxxx';

# create database "icinga2" with owner='icinga2''

#\q

$ exit


# vi /var/lib/pgsql/10/data/pg_hba.conf (设置postgres对所有数据库为peer认证方式,icinga2账号对icinga2数据库为md5认证方式)


local all postgres peer

local all icinga2 md5

host all icinga2 md5

:wq

# /etc/init.d/postgresql-10 restart


导入icinga2的sql结构:

# psql -U icinga2 -d icinga2 < /usr/share/icinga2-IDo-pgsql/schema/pgsql.sql


启用IDo-pgsql.conf


# vi /etc/icinga2/features-enabled/IDo-pgsql.conf


library "db_IDo_pgsql"


object IDoPgsqlConnection "IDo-pgsql" {

user = "icinga2"

password = "xxxxxx"

host = "localhost"

database = "icinga2"

}


:wq

# icinga2 feature enable IDo-pgsql


最后重启icinga2即可

# service icinga2 restart

总结

以上是内存溢出为你收集整理的icinga2+postgresql全部内容,希望文章能够帮你解决icinga2+postgresql所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/sjk/1171924.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-06-02
下一篇2022-06-02

发表评论

登录后才能评论

评论列表(0条)

    保存