数据库运维
记录DBA学习成长历程

DM8-DEM管理系统

文章目录

DM 企业管理器的英文简称 DM Enterprise Manager (DEM).

提供一个通过 WEB 界面来监控,管理,维护 DM 数据库的集中式管
理平台,可以从任何可以访问 web 应用的位置通过 DEM 来对 DM 数据库进行各种管理和监控。

1、检查JAVA环境

[dmdba@dmdb2 ~]$ rpm -qa | grep -i openjdk
java-1.8.0-openjdk-1.8.0.161-2.b14.el7.x86_64
java-1.7.0-openjdk-headless-1.7.0.171-2.6.13.2.el7.x86_64
java-1.7.0-openjdk-1.7.0.171-2.6.13.2.el7.x86_64
java-1.8.0-openjdk-headless-1.8.0.161-2.b14.el7.x86_64

将java环境添加dmdba用户下

[dmdba@dmdb2 jre]$ vi ~/.bash_profile 
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.161-2.b14.el7.x86_64/jre
export PATH=$JAVA_HOME/bin:$PATH

2、修改dm_ini参数

MEMORY_POOL = 200
BUFFER = 1000
KEEP = 64
MAX_BUFFER = 2000 (dm7才有的参数)
SORT_BUF_SIZE = 50

重启数据库实例

[dmdba@dmdb2 bin]$ ./DmServiceTEST restart
Stopping DmServiceTEST: [ OK ]
Starting DmServiceTEST: [ OK ]

3、在数据库中执行脚本

SQL>set define off
SQL>set char_code utf8
SQL>start /dm8/web/dem_init.sql

4、配置tomcat

解压:
[dmdba@dmdb2 bin]$ unzip apache-tomcat-8.0.20.zip
[dmdba@dmdb2 bin]$ mv apache-tomcat-8.0.20 tomat

编辑配置文件
[dmdba@dmdb2 conf]$ pwd
/dm8/bin/tomat/conf
[dmdba@dmdb2 conf]$ vi server.xml 
 <Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443"
maxPostSize="-1" />

war包放到tomcat下
[dmdba@dmdb2 conf]$ cp /dm8/web/dem.war /dm8/bin/tomat/webapps/

启动tomcat
[dmdba@dmdb2 bin]$ ./startup.sh 
Using CATALINA_BASE: /dm8/bin/tomat
Using CATALINA_HOME: /dm8/bin/tomat
Using CATALINA_TMPDIR: /dm8/bin/tomat/temp
Using JRE_HOME: /usr
Using CLASSPATH: /dm8/bin/tomat/bin/bootstrap.jar:/dm8/bin/tomat/bin/tomcat-juli.jar
Tomcat started.

此时web中的war包被自动解压
[dmdba@dmdb2 webapps]$ pwd
/dm8/bin/tomat/webapps
[dmdba@dmdb2 webapps]$ ls
dem dem.war docs examples host-manager manager ROOT

修改web配置文件
[dmdba@dmdb2 WEB-INF]$ pwd
/dm8/bin/tomat/webapps/dem/WEB-INF
[dmdba@dmdb2 WEB-INF]$ vi db.xml

<?xml version="1.0" encoding="UTF-8"?>
<ConnectPool>
<Server>10.0.0.201</Server>
<Port>5237</Port>
<User>SYSDBA</User>
<Password>Dameng123</Password>
<InitPoolSize>5</InitPoolSize>
<CorePoolSize>10</CorePoolSize>
<MaxPoolSize>50</MaxPoolSize>
<KeepAliveTime>60</KeepAliveTime>
<DbDriver></DbDriver>
<DbTestStatement>select 1</DbTestStatement>
<SSLDir>../sslDir/client_ssl/SYSDBA</SSLDir>
<SSLPassword></SSLPassword>
</ConnectPool>

重启tomcat
[dmdba@dmdb2 bin]$ ./shutdown.sh
Using CATALINA_BASE: /dm8/bin/tomat
Using CATALINA_HOME: /dm8/bin/tomat
Using CATALINA_TMPDIR: /dm8/bin/tomat/temp
Using JRE_HOME: /usr
Using CLASSPATH: /dm8/bin/tomat/bin/bootstrap.jar:/dm8/bin/tomat/bin/tomcat-juli.jar
[dmdba@dmdb2 bin]$ ./startup.sh
Using CATALINA_BASE: /dm8/bin/tomat
Using CATALINA_HOME: /dm8/bin/tomat
Using CATALINA_TMPDIR: /dm8/bin/tomat/temp
Using JRE_HOME: /usr
Using CLASSPATH: /dm8/bin/tomat/bin/bootstrap.jar:/dm8/bin/tomat/bin/tomcat-juli.jar
Tomcat started.

5、访问web页面

账号默认admin,密码888888

6、设置代理

修改配置文件

[dmdba@dmdb2 dmagent]$ pwd
/dm8/tool/dmagent
[dmdba@dmdb2 dmagent]$ vi config.properties
##[General]
##run_mode values:
##0 - assist process
##1 - assist process & monitor
##2 - assist process & monitor & deployer
run_mode=2
##id_gen_policy values:
##0: mac&ip, mac preferred
##1: ip
id_gen_policy=0
ap_port=6363
rmi_port=6364
#rmi_data_port \u6570\u636e\u7aef\u53e3\uff0c\u9ed8\u8ba4\u4e3a0,\u968f\u673a\u5206\u914d\u7aef\u53e3
rmi_data_port=0


##[DEM]
center.url=http://10.0.0.201:8080/dem
center.agent_servlet=dem/dma_agent
只修改IP就好!

7、执行脚本

[root@dmdb2 dmagent]# ./DMAgentService.sh install
Detected RHEL or Fedora:
Installing the DMAgentService daemon using systemd...
creating default service file...
Created symlink from /etc/systemd/system/multi-user.target.wants/DMAgentService.service to /usr/lib/systemd/system/DMAgentService.service.

8、启动代理

[root@dmdb2 dmagent]# ./DMAgentService.sh start
Starting DMAgentService...
.......... running: PID:8147

页面已经自动检测出主机

赞(0)
MySQL学习笔记 » DM8-DEM管理系统