【CMDB】onecmdb开源cmdbITIL软件部署
环境:
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. -C /opt
引⼊mysql jar包:
下载mysql-connector-java-5.1.
tar -xzvf mysql-connector-java-5.1.
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
l
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
mysql下载jar包修改l⽂件
cd /opt/onecmdb/repository/OneCMDB_Core/Configuration
l
修改数据库配置⽂件
cd /opt/onecmdb/tomcat/webapps/ROOT/WEB-INF/classes
l
<property name="driverClassName" value="sql.jdbc.Driver" />
<property name="url" value="jdbc:mysql://localhost:3306/onecmdb?useUnicode=true&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
管理账号
admin // 123
⽇志位置:
/opt/onecmdb/tomcat/logs
如果⽤的是5.0以上的mysql数据库,初始化时会报错:
2019-08-22 10:16:20,311 ERROR - ute(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 - ute(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不是很好看
全英⽂,⽆中⽂⽀持
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论