【CMDB】onecmdb 开源cmdb/ITIL软件部署

参考:
https://blog.csdn.net/shaw_young/article/details/78730724


资源:
官方主页:http://www.onecmdb.org/wiki/index.php?title=Main_Page 
官方下载:http://sourceforge.net/projects/onecmdb/files/ 

环境:
centos 7.5 x64
mariadb 5.5.56
ip:192.168.3.5

安装linux64位系统32位支持包glibc.i686

yum list glibc*

yum install glibc.i686 

解压到目录:
tar -xzvf onecmdb-2.1.0-linux.i386.tar.gz -C /opt

引入mysql jar包:
下载mysql-connector-java-5.1.48.tar.gz
tar -xzvf mysql-connector-java-5.1.48.tar.gz
cd mysql-connector-java-5.1.48
cp mysql-connector-java-5.1.48.jar  /opt/onecmdb/tomcat/webapps/ROOT/WEB-INF/lib 

编辑配置文件:

修改连接端口
cd  /opt/onecmdb/tomcat/conf

vi server.xml
1、<Server port="8295" shutdown="SHUTDOWN">

2、<!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
   <Connector port="8388" maxHttpHeaderSize="8192"
              maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
              enableLookups="false" redirectPort="8443" acceptCount="100"
              connectionTimeout="20000" disableUploadTimeout="true" />

3、<!-- Define an AJP 1.3 Connector on port 8009 -->
   <Connector port="8299"
              enableLookups="false" redirectPort="8443" protocol="AJP/1.3" />

修改setenv.sh文件
cd /opt/onecmdb/bin

vi setenv.sh

export ONECMDB_URL=http://localhost:8388
export ONECMDB_DESKTOP_URL=http://localhost:8388/onecmdb-desktop


修改onecmdb.xml文件
cd  /opt/onecmdb/repository/OneCMDB_Core/Configuration

vi onecmdb.xml

<entry key="oneCMDBwsdl">http://localhost:8388/webservice/onecmdb</entry>


修改数据库配置文件
cd  /opt/onecmdb/tomcat/webapps/ROOT/WEB-INF/classes 

vi datasource.xml

<property name="driverClassName" value="com.mysql.jdbc.Driver" />
<property name="url" value="jdbc:mysql://localhost:3306/onecmdb?useUnicode=true&amp;characterEncoding=utf8" />
<property name="username" value="root" />
<property name="password" value="mysql" />

创建数据库
CREATE DATABASE IF NOT EXISTS onecmdb default charset utf8 COLLATE utf8_general_ci;
 
启动应用:
cd /opt/onecmdb/bin

./onecmdb.sh start
./onecmdb.sh stop


访问地址:
http://192.168.3.5:8388/onecmdb-desktop

管理账号
admin // 123
    
日志位置:
/opt/onecmdb/tomcat/logs

如果用的是5.0以上的mysql数据库,初始化时会报错:
2019-08-22 10:16:20,311 ERROR - SchemaUpdate.execute(155) | Unsuccessful: create table Attribute (id bigint not null, derivedFromId bigint, displayName varchar(255), alias varchar(255), complexValue bit, isBlueprint bit, description text, typeName varch
ar(255), reftypename varchar(255), valueAsString text, valueAsLong bigint, valueAsDate datetime, ownerId bigint, maxOccurs integer, minOccurs integer, lastModified datetime, createTime datetime, primary key (id)) type=InnoDB
2019-08-22 10:16:20,312 ERROR - SchemaUpdate.execute(156) | You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'type=InnoDB' at line 1

在5.0之后版本
type=InnoDB 被 engine=InnoDB 替代

手动到数据库执行
create table Attribute (id bigint not null, derivedFromId bigint, displayName varchar(255), alias varchar(255), complexValue bit, isBlueprint bit, description text, typeName varchar(255), reftypename varchar(255), valueAsString text, valueAsLong bigint, valueAsDate datetime, ownerId bigint, maxOccurs integer, minOccurs integer, lastModified datetime, createTime datetime, primary key (id)) engine=InnoDB;

create table CI (id bigint not null, derivedFromId bigint, displayName varchar(255), alias varchar(255), gid bigint, path text, isBlueprint bit, description text, sourceId bigint, sourceAttributeId bigint, targetId bigint, sourceTemplatePath text, targetTemplatePath text, lastModified datetime, createTime datetime, primary key (id)) engine=InnoDB;

create table CMDBTX (id bigint not null, name varchar(255), status integer, issuer varchar(255), insertTs datetime, beginTs datetime, endTs datetime, rejectCause varchar(255), ciModified integer, ciAdded integer, ciDeleted integer, primary key (id)) engine=InnoDB;

create table RFC (id bigint not null, RFC_TYPE varchar(255) not null, parentId bigint, targetId bigint, targetCIId bigint, targetAlias varchar(255), txId bigint, ts datetime, destroyedAlias varchar(255), destroyedId bigint, wasCi bit, newAlias varchar(255), oldAlias varchar(255), newTemplate bit, oldTemplate bit, description text, newDisplayNameExpression varchar(255), oldDisplayNameExpression varchar(255), fromId bigint, toId bigint, toAlias varchar(255), oldReferenceTypeAlias varchar(255), newReferenceTypeAlias varchar(255), oldTypeAlias varchar(255), newTypeAlias varchar(255), oldMaxOccurs integer, newMaxOccurs integer, oldMinOccurs integer, newMinOccurs integer, oldValue text, newValue text, newValueAsAlias varchar(255), value text, indx integer, alias varchar(255), valueAsAlias varchar(255), oldOwnerId bigint, newOwnerId bigint, sourceAttributeId bigint, referenceTarget varchar(255), primary key (id)) engine=InnoDB;

--优点
部署简单

--缺点
界面UI不是很好看
全英文,无中文支持

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
CMDB(配置管理数据库)是一种用于跟踪和管理IT资产的工具,它提供了对组织内所有硬件、软件和网络资源的单一视图。MongoDB是一个开源的面向文档的NoSQL数据库管理系统,它使用JSON样式的文档存储数据。下面我将分别介绍CMDB和MongoDB的开源特性。 CMDB的开源属性主要体现在以下几个方面。首先,开源CMDB软件通常允许用户自由使用、修改和分发软件代码,保证了用户对该工具的灵活定制和自主控制。其次,开源CMDB软件经过开源社区的广泛参与和共同开发,可以获得来自全球开发者的技术支持和更新。再次,开源CMDB有更低的成本,用户不需要支付昂贵的许可费用,降低了企业的投资成本。最后,开源CMDB的代码可以被公开审查,更容易发现和解决潜在的漏洞和安全问题。 MongoDB作为一种开源数据库,具有以下特点。首先,MongoDB支持简单而强大的数据建模,用户可以使用灵活的文档模式存储数据,无需事先定义表结构,提高了开发效率。其次,MongoDB的分布式架构和水平扩展能力允许用户轻松地处理大规模的数据。再次,MongoDB具有高可用性和自动故障转移功能,通过自动复制和故障检测,保证了数据的可靠性。最后,由于MongoDB是开源的,用户可以根据自身需求进行定制和扩展,不受商业厂商限制。 总的来说,CMDB和MongoDB都是开源的工具,CMDB用于管理和跟踪IT资产,MongoDB是一种强大的NoSQL数据库。开源的特性为用户提供了灵活性、自主性和低成本的优势,同时也能获得全球开发者社区的技术支持和更新。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值