CMDBuild 是一款优秀的开源 CMDB 软件
A configuration management database (CMDB) is a repository that acts as a data warehouse for information technology (IT) installations. It holds data relating to a collection of IT assets (commonly referred to as configuration items (CI)), as well as to descriptive relationships between such assets. The repository provides a means of understanding
CMDB 是 IT 信息扩张过程中工具革新的一个必经之路
准确来说 CMDB 应该算作一种 IT 信息管理理念,对信息处理工具的信息通过信息系统进行管理的一种理念
CMDBuild 是这种理念的一个开源实现
这里分享一下 CMDBuild 的配置方法
Tip: 当前的版本为 cmdbuild-2.5.0
[root@h210 ~]# hostnamectl
Static hostname: h210
Icon name: computer-vm
Chassis: vm
Machine ID: 33dc28f7e76c4903ad9b603b77e29a7c
Boot ID: 739de39e0b1440618015b8dcd595f9f7
Virtualization: kvm
Operating System: CentOS Linux 7 (Core)
CPE OS Name: cpe:/o:centos:centos:7
Kernel: Linux 3.10.0-514.21.1.el7.x86_64
Architecture: x86-64
[root@h210 ~]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 08:00:27:f9:30:bb brd ff:ff:ff:ff:ff:ff
inet 10.0.2.15/24 brd 10.0.2.255 scope global dynamic enp0s3
valid_lft 82748sec preferred_lft 82748sec
inet6 fe80::2bb7:5b3:9584:d8eb/64 scope link
valid_lft forever preferred_lft forever
3: enp0s8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 08:00:27:a1:e7:17 brd ff:ff:ff:ff:ff:ff
inet 192.168.56.210/24 brd 192.168.56.255 scope global enp0s8
valid_lft forever preferred_lft forever
inet6 fe80::a00:27ff:fea1:e717/64 scope link
valid_lft forever preferred_lft forever
4: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN qlen 1000
link/ether 52:54:00:16:5e:11 brd ff:ff:ff:ff:ff:ff
inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
valid_lft forever preferred_lft forever
5: virbr0-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast master virbr0 state DOWN qlen 1000
link/ether 52:54:00:16:5e:11 brd ff:ff:ff:ff:ff:ff
[root@h210 ~]#
前面的两篇文章中已经交代了 JDK Tomcat PostgreSQL 的安装方法,这里有不明白的可以翻阅前面的博客进行了解
其它相关细节可以参考 System requirements
http://192.168.56.210:8080/cmdbuild/
选中 Show language choice in the login window 然后下一步
需要对默认的 pg_hba.conf
进行调整,以允许来自本地的密码访问
[root@h210 data]# pwd
/var/lib/pgsql/10/data
[root@h210 data]# ls
base pg_ident.conf pg_stat pg_xact
current_logfiles pg_logical pg_stat_tmp postgresql.auto.conf
global pg_multixact pg_subtrans postgresql.conf
log pg_notify pg_tblspc postmaster.opts
pg_commit_ts pg_replslot pg_twophase postmaster.pid
pg_dynshmem pg_serial PG_VERSION
pg_hba.conf pg_snapshots pg_wal
[root@h210 data]# vim pg_hba.conf
[root@h210 data]# grep -v "#" pg_hba.conf | cat -s
local all all peer
host all all 127.0.0.1/32 md5
host all all 127.0.0.1/32 ident
host all all ::1/128 ident
local replication all peer
host replication all 127.0.0.1/32 ident
host replication all ::1/128 ident
[root@h210 data]#
添加了以下一条配置,以允许来自本地的密码访问
host all all 127.0.0.1/32 md5
测试连接
[root@h210 data]# psql -U postgres -h 127.0.0.1 -W
Password for user postgres:
psql (10.3)
Type "help" for help.
postgres=# \l
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileg
es
-----------+----------+----------+-------------+-------------+------------------
-----
cmdbuild | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres
+
| | | | | postgres=CTc/post
gres
template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres
+
| | | | | postgres=CTc/post
gres
testdb | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
(5 rows)
postgres=#
如果不加以上配置会怎样呢
[root@h210 data]# psql -U postgres -h 127.0.0.1 -W
Password for user postgres:
psql: FATAL: Ident authentication failed for user "postgres"
[root@h210 data]# echo $?
2
[root@h210 data]#
日志中会有如下报错
2018-03-07 23:07:58.008 CST [3955] LOG: could not connect to Ident server at address "127.0.0.1", port 113: Connection refused
2018-03-07 23:07:58.008 CST [3955] FATAL: Ident authentication failed for user "postgres"
2018-03-07 23:07:58.008 CST [3955] DETAIL: Connection matched pg_hba.conf line 83: "host all all 127.0.0.1/32 ident"
即便我的密码没错,连接还是被拒绝了,因为匹配上了 pg_hba.conf 中的一条策略,在本地尝试使用 TCP 进行连接的时候,会使用 pg_ident.conf 中的映射关系,将本地用户映射成数据库中的用户进行登录,而 pg_ident.conf 中并没有此映射,所以登录被拒绝了
Tip: 修改完 pg_hba.conf 后,需要对服务进行重载,以使变更后的配置生效
[root@h210 data]# vim pg_hba.conf
[root@h210 data]# systemctl reload postgresql-10
[root@h210 data]#
点击 [Test connection] 来测试数据库的联通性
CMDBuild 支持很多种语言,可以选择自己熟悉的语言
数据管理模块和系统管理模块
切换成中文后
虽然还有很多处没有翻译过来,不过这个界面对于英语基础偏弱一点的同学来说,已经容易很多了
从整个过程来看,CMDBuild 的配置还是十分简单的
已经被此软件封装了很多细节,包括 schema 的导入
关于 CMDBuild 的使用后面有机会再进行展开
本文系转载,前往查看
如有侵权,请联系 cloudcommunity@tencent.com 删除。
本文系转载,前往查看
如有侵权,请联系 cloudcommunity@tencent.com 删除。