CMDBuild-2.4.3 for CentOS 7安装配置
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了CMDBuild-2.4.3 for CentOS 7安装配置相关的知识,希望对你有一定的参考价值。
由于公司不断扩大,服务器数量日益增多,服务器管理由原来的Excel表格管理问题不断增加。近日公司Boss想找一款开源的CMDB管理系统,对比了腾讯的蓝鲸和CMDBuild,决定使用CMDBuild。下面我们部署一套,与大家分享一下。
一、架构与准备工作
IP | OS | 软件 | 数据库 | |
CMDB Server | 192.168.11.151 | CentOS 7.2 | CMDBuild-2.4.3 | postgresql-server-9.2.18 |
CMDB Client | 192.168.11.148 | Windows 7 | IE 8 |
准备工作:
Tomcat :7.0以上
JDK: 1.8 以上
二、安装部署
1、下载Tomcat7和CMDBuild2.4.3。下载链接如下:
Tomcat:http://tomcat.apache.org/download-70.cgi
CMDBuild2.4.3:https://sourceforge.net/projects/cmdbuild/files/latest/download
2、解压并复制CMDBuild到Tomcat的对应目录:
[[email protected] ~]# tar xvf apache-tomcat-7.0.79.tar.gz -C /data/ [[email protected] ~]# cp /root/cmdb/cmdbuild-2.4.3/cmdbuild-2.4.3.war /data/apache-tomcat-7.0.79/webapps/cmdbuild.war [[email protected] ~]# cp /root/cmdb/cmdbuild-2.4.3/extras/tomcat-libs/6.0\ or\ higher/postgresql-9.4.1207.jar /data/apache-tomcat-7.0.79/lib/
解压cmdbuild-2.3.0/extras下面的cmdbuild-distribution-shark-overlay-2.4.3.zip,并将cmdbuild-distribution-shark-overlay-2.4.3复制到tomcat下的webapps目录并改名为shark:
[[email protected] ~]#cp -r /root/cmdb/cmdbuild-2.4.3/extras/cmdbuild-shark-overlay-2.4.3 /data/apache-tomcat-7.0.79/webapps/shark
3、启动tomcat,访问http://localhost:8080,看看是否启动成功:
[[email protected] ~]# cd /data/apache-tomcat-7.0.79/bin/ [[email protected] ~]# ./startup.sh
[[email protected] ~]# ./shutdown.sh
3、安装数据库postgresql
[[email protected] ~]# yum install postgresql-server postgresql -y
4、初始化postgresql
[[email protected] ~]# postgresql-setup initdb Initializing database ... OK
5、修改配置,让所有地址都可以登陆
[[email protected] ~]# vim /var/lib/pgsql/data/postgresql.conf 末尾添加: listen_addresses = ‘*‘
6、授权可以登录登录
[[email protected] ~]# vim /var/lib/pgsql/data/pg_hba.conf 修改: local all all md5 添加: host all all 192.168.11.151/32 md5
7、重启postgresql
[[email protected] ~]# systemctl restart postgresql.service [[email protected] ~]# systemctl enable postgresql.service
8、新建数据库
[[email protected] ~]# su - postgres -bash-4.2$ psql postgres=# create database cmdbuild with owner postgres encoding = ‘UTF8‘; postgres=# ALTER USER postgres WITH PASSWORD ‘postgres‘; postgres=# \q -bash-4.2$ psql -d cmdbuild cmdbuild=# CREATE LANGUAGE plpgsql; postgres=# \q
9、导入demo数据库文件
-bash-4.2$ psql -d cmdbuild -f /data/apache-tomcat-7.0.79/webapps/cmdbuild/WEB-INF/sql/sample_schemas/demo_schema.sql 10、配置cmdbuild [[email protected] ~]# vim /data/apache-tomcat-7.0.79/webapps/cmdbuild/WEB-INF/conf/cmdbuild.conf 末尾添加: language=en
11、配置数据库连接配置,(注意防火墙:firewalld.service 和selinux)
[[email protected] ~]# vim /data/apache-tomcat-7.0.79/webapps/cmdbuild/WEB-INF/conf/database.conf 末尾添加: db.url=jdbc\:postgresql\://localhost\:5432/cmdbuild db.username=postgres db.password=postgres
12、安装Workflow
[[email protected] ~]# vim /data/apache-tomcat-7.0.79/webapps/shark/conf/Shark.conf 末尾添加: orgNaNdbuild.ws.url=http://localhost:8080/cmdbuild/ orgNaNdbuild.ws.username=workflow orgNaNdbuild.ws.password=admin
13、修改auth.conf
[[email protected] ~]# vim /data/apache-tomcat-7.0.79/webapps/cmdbuild/WEB-INF/conf/auth.conf 末尾添加: serviceusers.privileged=workflow
14、创建数据库
[[email protected] ~]# su – postgres -bash-4.2$ createuser -s -P shark -Upostgres Enter password for new role: shark Enter it again:shar -bash-4.1$ psql -d cmdbuild -U postgres psql (8.4.18) Type "help" for help. cmdbuild=# \i /data/apache-tomcat-7.0.79/webapps/cmdbuild/WEB-INF/sql/shark_schema/01_shark_user.sql cmdbuild=# \i /data/apache-tomcat-7.0.79/webapps/cmdbuild/WEB-INF/sql/shark_schema/02_shark_emptydb.sql cmdbuild=# \dt
三、启动tomcat,登陆测试CMDBuild:
账号:admin
密码:admin
本文出自 “gentoo” 博客,请务必保留此出处http://linuxgentoo.blog.51cto.com/7678232/1947207
以上是关于CMDBuild-2.4.3 for CentOS 7安装配置的主要内容,如果未能解决你的问题,请参考以下文章