-
DEM部署DPC集群
-
DPC准备工作
-
在所有安装DPC服务器上部署dmagent,dmagent的运行环境需要依赖JAVA环境,JAVA版本必须为JAVA1.8。
-
-
-
创建用户
-
-
所有安装DPC服务器,手工建dmdba用户
# groupadd dinstall
# useradd -g dinstall -d /home/dmdba -s /bin/bash -m dmdba
# passwd dmdba
-
-
-
创建目录并复权
-
-
# mkdir -p /dm8/DMDeploy
# chown -R dmdba:dinstall /dm8
# chmod -R 775 /dm8
-
-
-
安装agent
-
-
# mkdir -p /opt/dmagent7.15
# unzip dmagent-7.1.5.zip
# chown -R dmdba:dinstall /opt/dmagent7.15
# chmod -R 775 /opt/dmagent7.15
-
-
-
安装JDK1.8
-
-
上传jdk-8u121-linux-x64.tar
# tar -xvf jdk-8u121-linux-x64.tar
# mv jdk1.8.0_121/ /usr/local/
监控数据库主机或数据库需要在被监控的服务器上启动dmagent服务。
注意:要求agent和dem所运行主机时间一致,尽量不要有差距,否则可能无法正常监控
vi /opt/dmagent7.15/agent.ini
center_url = http://84.0.191.5:8080/dem #DEM 访问地址
gather_enable=true #开启收集监控数据功能,默认打开
service_enable=true #开启远程调用功能,部署时需要打开
-
-
-
配置环境变量
-
-
vi .bash_profile
export JAVA_HOME=/usr/local/jdk1.8.0_121
export PATH=$JAVA_HOME/bin:$PATH
. .bash_profile
$ /opt/dmagent7.15/start.sh -d /opt/dmagent7.15/agent.ini
Starting dmagent.....
dmagent(pid: 59626) started successfully.
HOST_NAME | IP | EP LIST | IP LIST | WORKING_DIRECTORY |
dm8dpc01 | 公网IP:84.0.191.60 私网IP:84.0.191.60 | SP:SP1 | 84.0.191.60 | /dm8/DMDeploy |
dm8dpc02 | 公网IP:84.0.191.61 私网IP:84.0.191.61 | MP:MP_A | 84.0.191.61 | /dm8/DMDeploy |
dm8dpc03 | 公网IP:84.0.191.62 私网IP:84.0.191.62 | MP:MP_B | 84.0.191.62 | /dm8/DMDeploy |
dm8dpc04 | 公网IP:84.0.191.63 私网IP:84.0.191.63 | BP:BP1_C MP:MP_C | 84.0.191.63 | /dm8/DMDeploy |
dm8dpc05 | 公网IP:84.0.191.64 私网IP:84.0.191.64 | BP:BP1_A | 84.0.191.64 | /dm8/DMDeploy |
dm8dpc06 | 公网IP:84.0.191.65 私网IP:84.0.191.65 | BP:BP1_B | 84.0.191.65 | /dm8/DMDeploy |
-
-
-
实例规划
-
-
INSTANCE_NAME | PORT_NUM | AP_PORT_NUM | WORKING_DIRECTORY |
[SP]SP1 | 5230 | 1630 | /dm8/DMDeploy |
[MP]MP_A | 5220 | 1620 | /dm8/DMDeploy |
[MP]MP_B | 5220 | 1620 | /dm8/DMDeploy |
[MP]MP_C | 5220 | 1620 | /dm8/DMDeploy |
[BP]BP1_A | 5240 | 1640 | /dm8/DMDeploy |
[BP]BP1_B | 5240 | 1640 | /dm8/DMDeploy |
[BP]BP1_C | 5240 | 1640 | /dm8/DMDeploy |
-
-
DPC集群部署
-
集群部署
-
-
-
-
-
集群名称
-
-
-
-
-
集群类型
-
-
-
-
-
选择部署主机
-
-
-
-
-
参数配置
-
-
-
-
-
BP组和BP域配置
-
-
-
-
-
初始化参数配置
-
-
-
-
-
开始部署
-
-
-
-
查看DPC集群配置参数
-
dm.ini配置信息
-
SP1配置dm.ini文件
-
-
-
$cat /dm8/DMDeploy/dmdpc/SP1/DAMENG/dm.ini
INSTANCE_NAME = SP1
PORT_NUM = 5230
ARCH_INI = 0 #归档配置 0关闭/1打开(0默认)
ALTER_MODE_STATUS = 1 #不允许用户直接通过 SQL 语句(1默认)
-
-
-
- MP_A配置dm.ini文件
-
-
$cat /dm8/DMDeploy/dmdpc/MP_A/DAMENG/dm.ini
INSTANCE_NAME = MP_A
PORT_NUM = 5220
ARCH_INI = 1 #归档配置 0关闭/1打开(0默认)
ALTER_MODE_STATUS = 0 #不允许用户直接通过 SQL 语句(1默认)
-
-
-
- MP_B配置dm.ini文件
-
-
$cat /dm8/DMDeploy/dmdpc/MP_B/DAMENG/dm.ini
INSTANCE_NAME = MP_B
PORT_NUM = 5220
ARCH_INI = 1 #归档配置 0关闭/1打开(0默认)
ALTER_MODE_STATUS = 0 #不允许用户直接通过 SQL 语句(1默认)
-
-
-
- MP_C配置dm.ini文件
-
-
$cat /dm8/DMDeploy/dmdpc/MP_C/DAMENG/dm.ini
INSTANCE_NAME = MP_C
PORT_NUM = 5220
ARCH_INI = 1 #归档配置 0关闭/1打开(0默认)
ALTER_MODE_STATUS = 0 #不允许用户直接通过 SQL 语句(1默认)
-
-
-
- BP1_A配置dm.ini文件
-
-
$ cat /dm8/DMDeploy/dmdpc/BP1_A/DAMENG/dm.ini
INSTANCE_NAME = BP1_A
PORT_NUM = 5240
ARCH_INI = 1 #打开归档配置
ALTER_MODE_STATUS = 0 #不允许用户直接通过 SQL 语句修改服务器模式
-
-
-
- BP1_B配置dm.ini文件
-
-
$ cat /dm8/DMDeploy/dmdpc/BP1_B/DAMENG/dm.ini
INSTANCE_NAME = BP1_B
PORT_NUM = 5240
ARCH_INI = 1 #打开归档配置
ALTER_MODE_STATUS = 0 #不允许用户直接通过 SQL 语句修改服务器模式
-
-
-
- BP1_C配置dm.ini文件
-
-
$ cat /dm8/DMDeploy/dmdpc/BP1_C/DAMENG/dm.ini
INSTANCE_NAME = BP1_C
PORT_NUM = 5240
ARCH_INI = 1 #打开归档配置
ALTER_MODE_STATUS = 0 #不允许用户直接通过 SQL 语句修改服务器模式
$ cat /dm8/DMDeploy/dmdpc/SP1/DAMENG/mp.ini
[MP_A]
MP_HOST= 84.0.191.61
MP_PORT= 9000
[MP_B]
MP_HOST= 84.0.191.62
MP_PORT= 9000
[MP_C]
MP_HOST= 84.0.191.63
MP_PORT= 9000
-
-
-
- MP_A配置MP.INI文件
-
-
$ cat /dm8/DMDeploy/dmdpc/MP_A/DAMENG/mp.ini
[MP_A]
MP_HOST= 84.0.191.61
MP_PORT= 9000
[MP_B]
MP_HOST= 84.0.191.62
MP_PORT= 9000
[MP_C]
MP_HOST= 84.0.191.63
MP_PORT= 9000
-
-
-
- MP_B配置MP.INI文件
-
-
$ cat /dm8/DMDeploy/dmdpc/MP_B/DAMENG/mp.ini
[MP_A]
MP_HOST= 84.0.191.61
MP_PORT= 9000
[MP_B]
MP_HOST= 84.0.191.62
MP_PORT= 9000
[MP_C]
MP_HOST= 84.0.191.63
MP_PORT= 9000
-
-
-
- MP_C配置MP.INI文件
-
-
$ cat /dm8/DMDeploy/dmdpc/MP_C/DAMENG/mp.ini
[MP_A]
MP_HOST= 84.0.191.61
MP_PORT= 9000
[MP_B]
MP_HOST= 84.0.191.62
MP_PORT= 9000
[MP_C]
MP_HOST= 84.0.191.63
MP_PORT= 9000
-
-
-
- BP1_A配置MP.INI文件
-
-
$ cat /dm8/DMDeploy/dmdpc/BP1_A/DAMENG/mp.ini
[MP_A]
MP_HOST= 84.0.191.61
MP_PORT= 9000
[MP_B]
MP_HOST= 84.0.191.62
MP_PORT= 9000
[MP_C]
MP_HOST= 84.0.191.63
MP_PORT= 9000
-
-
-
- BP1_B配置MP.INI文件
-
-
$ cat /dm8/DMDeploy/dmdpc/BP1_B/DAMENG/mp.ini
[MP_A]
MP_HOST= 84.0.191.61
MP_PORT= 9000
[MP_B]
MP_HOST= 84.0.191.62
MP_PORT= 9000
[MP_C]
MP_HOST= 84.0.191.63
MP_PORT= 9000
-
-
-
- BP1_C配置MP.INI文件
-
-
$ cat /dm8/DMDeploy/dmdpc/BP1_C/DAMENG/mp.ini
[MP_A]
MP_HOST= 84.0.191.61
MP_PORT= 9000
[MP_B]
MP_HOST= 84.0.191.62
MP_PORT= 9000
[MP_C]
MP_HOST= 84.0.191.63
MP_PORT= 9000
-
-
- dmarch.ini配置信息
-
$ cat /dm8/DMDeploy/dmdpc/BP1_A/DAMENG/dmarch.ini
XMAL_HB_INTERVAL= 5
RAFT_HB_INTERVAL= 150
RAFT_VOTE_INTERVAL= 1000
RAFT_SELF_ID= 0
ARCH_RESERVE_TIME= 0
[ARCHIVE_LOCAL1]
ARCH_TYPE= LOCAL
ARCH_DEST= /dm8/DMDeploy/dmdpc/BP1_A/DAMENG/arch
ARCH_FILE_SIZE= 128
ARCH_SPACE_LIMIT= 0
[ARCHIVE_RAFT1]
ARCH_TYPE= RAFT
ARCH_DEST= BP1_B
ARCH_DEST_ID= 1
[ARCHIVE_RAFT2]
ARCH_TYPE= RAFT
ARCH_DEST= BP1_C
ARCH_DEST_ID= 2
-
-
-
- BP1_B的RAFT归档
-
-
$ cat /dm8/DMDeploy/dmdpc/BP1_B/DAMENG/dmarch.ini
XMAL_HB_INTERVAL= 5
RAFT_HB_INTERVAL= 150
RAFT_VOTE_INTERVAL= 2000
RAFT_SELF_ID= 1
ARCH_RESERVE_TIME= 0
[ARCHIVE_LOCAL1]
ARCH_TYPE= LOCAL
ARCH_DEST= /dm8/DMDeploy/dmdpc/BP1_B/DAMENG/arch
ARCH_FILE_SIZE= 128
ARCH_SPACE_LIMIT= 0
[ARCHIVE_RAFT1]
ARCH_TYPE= RAFT
ARCH_DEST= BP1_C
ARCH_DEST_ID= 2
[ARCHIVE_RAFT2]
ARCH_TYPE= RAFT
ARCH_DEST= BP1_A
ARCH_DEST_ID= 0
-
-
-
- BP1_C的RAFT归档
-
-
$ cat /dm8/DMDeploy/dmdpc/BP1_C/DAMENG/dmarch.ini
XMAL_HB_INTERVAL= 5
RAFT_HB_INTERVAL= 150
RAFT_VOTE_INTERVAL= 3000
RAFT_SELF_ID= 2
ARCH_RESERVE_TIME= 0
[ARCHIVE_LOCAL1]
ARCH_TYPE= LOCAL
ARCH_DEST= /dm8/DMDeploy/dmdpc/BP1_C/DAMENG/arch
ARCH_FILE_SIZE= 128
ARCH_SPACE_LIMIT= 0
[ARCHIVE_RAFT1]
ARCH_TYPE= RAFT
ARCH_DEST= BP1_B
ARCH_DEST_ID= 1
[ARCHIVE_RAFT2]
ARCH_TYPE= RAFT
ARCH_DEST= BP1_A
ARCH_DEST_ID= 0