产品安装指南
安装准备
机器资源
所有环境需要安装CentOS Linux release 7.4操作系统。(请使用最小安装方式安装,避免存在已有安装包与平台安装包冲突的情况)
安装建议机器配置
机器 | 最低配置 | 建议配置 | 安装软件 |
---|---|---|---|
机器1 | 4c8g100g | 8c16g200g | JDK、Nginx、Redis、数据资源目录平台 |
机器2 | 4c8g200g | 8c16g400g | MySQL 5.7 |
机器2 | 4c8g200g | 8c16g400g | Elasticsearch 6.4.3 |
安装包准备
普元数据资源目录平台提供两个版本的介质,分别是微应用版和独立版。其中微应用版需要结合EOS8.2.2微服务平台使用,而独立版本可直接安装运行。
微应用版:Primeton_DRCM_7.1_LA_MicroApp.tar.gz
独立版:Primeton_DRCM_7.1_LA_Standalone.tar.gz
JDK环境准备
普元数据资源目录平台支持的JDK为OracleJDK 1.8、OpenJDK 1.8,部署之前需要预先安装JDK并配置环境变量。
数据库环境准备
普元数据资源目录平台支持的数据库厂商有:MySQL 5.7,部署之前需要将对应的数据库环境安装完成。
Nginx环境准备
普元数据资源目录平台使用的Nginx版本为1.18,需要预先安装Nginx环境。
Redis环境准备
普元数据资源目录平台使用的Redis版本为5.0.12,需要在部署前安装完成。
ElasticSearch环境准备
普元数据资源目录平台使用的ElasticSearch版本为6.4.3,需要在部署前安装完成。
元数据环境准备
普元数据资源目录平台依赖普元元数据(7.5GA)平台,需要在部署前安装完成。
独立版安装
文档中以MySQL数据安装为示例进行安装。
安装介质说明和准备
独立安装介质内置了AFCenter,无需再安装AFCenter环境。 独立安装介质目录如下:
数据库初始化
创建数据库
创建rcm数据库。执行如下脚本:
CREATE DATABASE `rcm` DEFAULT CHARACTER SET utf8mb4;
执行初始化脚本
独立介质安装时需要按顺序执行EOS、AFCenter、DRCM的数据库初始化脚本。初始化脚本路径为 Primeton_DRCM_7.1_LA_Standalone/server/drcm/db-scripts,其中包括了EOS、AFCenter、DRCM的脚本。 数据库初始化,按顺序执行如下脚本:
修改配置文件
后端配置
资源目录后端配置文件如下:
drcm/config/application.properties
drcm/config/application-afc.properties
drcm/config/application-bps.properties
drcm/config/application-catalog.properties
drcm/config/DRCM-STANDALONE/config/user-config.xml
application.properties:
server.port=28088#根据实际情况修改
spring.application.name=DRCM-STANDALONE#根据实际情况修改
#spring.profiles.active=eureka
spring.profiles.active=nacos,afc,bps,catalog
management.endpoints.web.exposure.include=hystrix.stream,health,info,loggers,eos,mappings
out.config.folder=config
eos.application.sys-code=DRCM-STANDALONE
eos.application.sys-key=dc6baaed30e541d78bb91274803d9432
# eos cache config
eos.cache.mode=redis
# redis
spring.redis.host=172.50.1.202#根据实际情况修改
spring.redis.port=6379#根据实际情况修改
spring.redis.password=primeton#根据实际情况修改
spring.redis.lettuce.pool.max-active=100
spring.redis.lettuce.pool.max-idle=100
spring.redis.lettuce.pool.max-wait=5000
eos.export.depend-api-contributions=com.primeton.data.catalog.portal.api,com.primeton.data.dam.api,com.primeton.common.component.api
application-afc.properties:
# attachment
# mode: local,db,nexus,aliyun-oss
afc.attachments.persistence-mode=local#根据实际情况修改
afc.attachments.local.dir=
afc.attachments.nexus.repository-url=
afc.attachments.nexus.username=
afc.attachments.nexus.password=
afc.attachments.aliyun-oss.endpoint=
afc.attachments.aliyun-oss.access-key-id=
afc.attachments.aliyun-oss.access-key-secret=
afc.attachments.aliyun-oss.bucket-name=
afc.attachments.libre-office.host=
afc.attachments.libre-office.port=
# afc environment
afc.environment.active=dev
# operation-logs to history
afc.schedule.logs-to-history.cron=0 0 4 1 1/1 ?
afc.schedule.logs-to-history.stay-month-number=2
application-bps.properties:
bps.local.thread=true
application-catalog.properties:
primeton.governor.username=admin
primeton.governor.password=000000
primeton.governor.cipher=false
primeton.governor.uri=http://172.50.1.202:31198/
primeton.governor.routeUri=DataEngine
primeton.governor.tokenExpiredTime=10
primeton.governor.systemIdDEV=b0b0fceb-f780-41bd-a2ec-564b59ecaac6
primeton.governor.systemIdPRO=b5819b67-fb4f-413d-984f-628a7afcaae3
primeton.elasticsearch.host=172.50.1.202:9200
#primeton.elasticsearch.port=9200
# skywalking notice utl
alarm.skywalking.receive.adress=http://127.0.0.1:28085/com.primeton.data.dam.service.skywalkingReceive#根据实际情况修改
# notice send url
alarm.skywalking.send.adress=http://127.0.0.1:28085/webhook#根据实际情况修改
# nacos properties
# used to refresh skywalking properties
alarm.skywalking.nacos.serverAddr=172.50.1.176:8848
alarm.skywalking.nacos.namespace=
alarm.skywalking.nacos.username=nacos
alarm.skywalking.nacos.password=nacos
eos.export.depend-api-contributions=com.primeton.common.component.api,com.primeton.data.dam.api
user-config.xml修改其中default数据源配置:
<module name="DataSource">
<!--system default datasouce -->
<group name="default">
<configValue key="Database-Type">MySql</configValue>
<configValue key="Jdbc-Type"/>
<configValue key="C3p0-DriverClass">com.mysql.jdbc.Driver</configValue>
<configValue key="C3p0-Url">jdbc:mysql://localhost:3306/server205_catalog?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8&useSSL=false</configValue>
<configValue key="C3p0-UserName">username</configValue>
<configValue key="C3p0-Password">password</configValue>
<configValue key="C3p0-PoolSize">10</configValue>
<configValue key="C3p0-MaxPoolSize">50</configValue>
<configValue key="C3p0-MinPoolSize">10</configValue>
<!-- //seconds, 0 means connections never expire -->
<configValue key="C3p0-MaxIdleTime">600</configValue>
<!-- //idle connections never tested -->
<configValue key="C3p0-IdleConnectionTestPeriod">900</configValue>
<configValue key="C3p0-MaxStatements">0</configValue>
<configValue key="C3p0-NumHelperThreads">1</configValue>
<configValue key="Transaction-Isolation">ISOLATION_DEFAULT</configValue>
<configValue key="Test-Connect-Sql">SELECT count(*) from EOS_UNIQUE_TABLE</configValue>
<configValue key="Retry-Connect-Count">-1</configValue>
</group>
</module>
前端配置
nginx配置在web/standalone.conf:
upstream standalone {
server 127.0.0.1:28088;
}
server {
listen 8001;
client_body_buffer_size 10m; #缓存区大小
client_max_body_size 100m;
# 页面转发
location / {
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
root "/home/primeton/web/afcenter";
index index.html index.htm;
}
location /dam/ {
alias "/home/primeton/web/dam/";
}
location /catalog/ {
alias "/home/primeton/web/catalog/";
}
location /dataService/ {
alias "/home/primeton/web/dataService/";
}
location /catalog_portal {
alias "/home/primeton/web/catalog_portal";
}
location /formApp {
alias "/home/primeton/web/formApp/" ;
}
location /CATALOG-PORTAL/api {
proxy_pass http://standalone/CATALOG-PORTAL/api ;
}
# 接口转发
location /afc {
#proxy_http_version 1.1;
#proxy_set_header Host $host;
#proxy_set_header X-Real-IP $remote_addr;
#proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://standalone/;
}
#服务引擎测试节点地址
location /test/api {
proxy_pass http://127.0.0.1:10010/api;
}
location /com.primeton.data.catalog.portal {
proxy_pass http://standalone/com.primeton.data.catalog.portal;
}
location /com.primeton.data.dam {
proxy_pass http://standalone/com.primeton.data.dam;
}
#平台配置接口
location /com.primeton.common.component {
proxy_pass http://standalone/com.primeton.common.component;
}
}
启动服务
启动服务时需要分别启动前后端应用,后端通过bin目录下的启动命令启动。前端则通过nginx加载配置启动。
后端启动
linux
[primeton@localhost allinone]$ ./bin/startup.sh
Windows:
D:\develop\allinone>./bin/startup.cmd
前端启动
linux
[root@localhost web]# nginx -s standalone.conf
Windows:
D:\develop\nginx-1.20.1>nginx.exe -s standalone.conf
环境登录及验证
访问http://localhost:port,使用初始用户登录,初始用户名、密码为:admin、000000。 用户正常登录并且能够看到资源目录菜单即可。
补充
待补充。
微应用版本安装
文档中以MySQL数据安装为示例进行安装。
安装介质说明和准备
微应用安装介质,在安装之前需要提前准备好EOS8环境。 安装的前后端介质需要在“/EOS8GA/821LA2_Release_20220831/private-medium”路径下对应的位置存放。
微应用安装介质需提前准备好”Primeton_DRCM_7.1_LA_MicroApp.tar.gz“文件,解压后”Primeton_DRCM_7.1_LA_Server.tar.gz“对应后端介质,“Primeton_DRCM_7.1_LA_UI.tar.gz”对应前端介质。
微应用安装介质目录如下:
数据库初始化
创建数据库
创建rcm数据库。执行如下脚本:
CREATE DATABASE `rcm` DEFAULT CHARACTER SET utf8mb4;
执行初始化脚本
微应用安介质安装时需要按顺序执行对应数据库的数据库初始化脚本。初始化脚本路径为 Primeton_DRCM_7.1_LA_MicroApp/server/db-scripts/Mysql。 数据库初始化,按顺序执行如下脚本:
# 资源目录&服务化
01-drcm_catalog-table.sql #资源目录表结构初始化脚本
02_drcm_catalog_view.sql #资源目录视图初始化脚本,注意其中包含了元数据视图,需要修改脚本中的元数据schema
03_drcm_dataserivce_table.sql #数据服务表结构初始化
04_drcm_catalog_init_data.sql #初始化资源目录数据
# afc数据初始化
00-afc-data.sql #afc应用、功能、角色、权限、测试部门、测试人员、测试账号等相关数据的初始化
# bps流程配置数据初始化
01_bps_init_data.sql #主要针对资源目录相关流程配置的初始化
修改配置文件
后端配置
微应用安介质安装时的配置文件,有需要修改的地方会在后面用“##”提示说明。 需要修改的配置文件如下:
server/config/application.properties
server/config/application-nacos.properties
server/config/application-service.properties
server/config/bootstrap.properties
server/config/CATALOG-PORTAL/config/user-config.xml
application.properties:
server.port=28084 ##-按需修改
spring.application.name=CATALOG-PORTAL
#spring.profiles.active=eureka
spring.profiles.active=nacos,service
management.endpoints.web.exposure.include=hystrix.stream,health,info,loggers,eos,mappings
out.config.folder=config
eos.application.sys-code=datacenter ##-与eos8-governor中配置的系统对应
eos.application.sys-key=b56ba52c93ee4745aa003ae260b15729 ##-与eos8-governor中配置的系统对应
# eos cache config
eos.cache.mode=redis
# redis
spring.redis.host=172.50.1.205 ##-根据实际情况修改
spring.redis.port=6379 ##-根据实际情况修改
spring.redis.password= ##-如果配置密码则配置,如果没有则默认为空即可
spring.redis.lettuce.pool.max-active=100
spring.redis.lettuce.pool.max-idle=100
spring.redis.lettuce.pool.max-wait=5000
# bps
bps.application.name=BPS-SERVER ##-eos8-bpsserver的应用名称
bps.tenant.id=
# afcenter
afc.application.name=AFCENTER ##-eos8-afcenter的应用名称
afc.application.tenant=sys_tenant
afc.application.appCode=
afc.application.appSecret=
eos.export.depend-api-contributions=com.primeton.common.component.api,com.primeton.data.dam.api
application-nacos.properties:
spring.cloud.nacos.discovery.enabled=true
spring.cloud.nacos.discovery.server-addr=172.50.1.205:8848 ##-根据实际情况配置
eureka.client.enabled=false
application-service.properties:
primeton.governor.username=xxxxxx ##-governor系统账号,用于模拟登录调用gateway相关接口
primeton.governor.password=000000 ##-governor登录密码,用于模拟登录调用gateway相关接口
primeton.governor.cipher=false
primeton.governor.uri=http://172.50.1.176:31160/ ##-governor登录地址
primeton.governor.routeUri=DataEngine
primeton.governor.tokenExpiredTime=10
primeton.governor.systemIdDEV=b0b0fceb-f780-41bd-a2ec-564b59ecaac6
primeton.governor.systemIdPRO=b0b0fceb-f780-41bd-a2ec-564b59ecaac6
primeton.elasticsearch.host=172.50.1.200:9200
#primeton.elasticsearch.port=9200
# 告警监控
alarm.skywalking.receive.adress=http://127.0.0.1:28085/com.primeton.data.dam.service.skywalkingReceive ##-根据实际情况修改
alarm.skywalking.send.adress=http://127.0.0.1:28085/webhook ##-根据实际情况修改
# nacos配置中心
alarm.skywalking.nacos.serverAddr=172.50.1.176:8848 ##-根据实际情况修改
alarm.skywalking.nacos.namespace=
alarm.skywalking.nacos.username=nacos ##-如果nacos设置了访问认证,则需要加上账号密码
alarm.skywalking.nacos.password=nacos ##-如果nacos设置了访问认证,则需要加上账号密码
bootstrap.properties:
# nacos-addr
spring.cloud.nacos.config.enabled=true
spring.cloud.nacos.config.server-addr=172.50.1.205:8848
spring.cloud.nacos.config.username= ##-如果nacos设置了访问认证,则需要加上账号密码
spring.cloud.nacos.config.password= ##-如果nacos设置了访问认证,则需要加上账号密码
user-config.xml修改其中default数据源配置:
<module name="DataSource">
<!--system default datasouce -->
<group name="default">
<configValue key="Database-Type">MySql</configValue>
<configValue key="Jdbc-Type"/>
<configValue key="C3p0-DriverClass">com.mysql.jdbc.Driver</configValue>
<configValue key="C3p0-Url">jdbc:mysql://localhost:3306/server205_catalog?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8&useSSL=false</configValue>
<configValue key="C3p0-UserName">username</configValue>
<configValue key="C3p0-Password">password</configValue>
<configValue key="C3p0-PoolSize">10</configValue>
<configValue key="C3p0-MaxPoolSize">50</configValue>
<configValue key="C3p0-MinPoolSize">10</configValue>
<!-- //seconds, 0 means connections never expire -->
<configValue key="C3p0-MaxIdleTime">600</configValue>
<!-- //idle connections never tested -->
<configValue key="C3p0-IdleConnectionTestPeriod">900</configValue>
<configValue key="C3p0-MaxStatements">0</configValue>
<configValue key="C3p0-NumHelperThreads">1</configValue>
<configValue key="Transaction-Isolation">ISOLATION_DEFAULT</configValue>
<configValue key="Test-Connect-Sql">SELECT count(*) from EOS_UNIQUE_TABLE</configValue>
<configValue key="Retry-Connect-Count">-1</configValue>
</group>
</module>
前端配置
修改nginx配置:
upstream eosgateway {
server 127.0.0.1:9090; ##-eos8-gateway地址
}
#EOS by gateway
server {
listen 80;
client_body_buffer_size 10m; #缓存区大小
client_max_body_size 100m;
# 页面转发
location / {
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
root "/home/primeton/web/afcenter";
index index.html index.htm;
}
location /dam/ {
alias "/home/primeton/web/dam/";
}
location /catalog/ {
alias "/home/primeton/web/catalog/";
}
location /dataService/ {
alias "/home/primeton/web/dataService/";
}
location /catalog_portal {
alias "/home/primeton/web/catalog_portal";
}
location /formApp {
alias "/home/primeton/web/formApp/" ;
# proxy_pass http://192.168.8.106:8000/formApp;
}
location /CATALOG-PORTAL/api {
proxy_set_header X-EOS-SourceSysKey f60929ea6a92454d86fbc65c437fb483;
proxy_pass http://eosgateway/CATALOG-PORTAL/api ;
}
# 接口转发
location /afc {
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-EOS-SourceSysKey f60929ea6a92454d86fbc65c437fb483;
proxy_pass http://eosgateway/afc;
}
location /test/api {
proxy_pass http://127.0.0.1:10010/api ;
}
location /com.primeton.data.catalog.portal {
proxy_set_header X-EOS-SourceSysKey f60929ea6a92454d86fbc65c437fb483;
proxy_pass http://eosgateway/com.primeton.data.catalog.portal;
}
location /com.primeton.data.dam {
proxy_set_header X-EOS-SourceSysKey f60929ea6a92454d86fbc65c437fb483;
proxy_pass http://eosgateway/com.primeton.data.dam;
}
location /com.primeton.common.component {
proxy_set_header X-EOS-SourceSysKey f60929ea6a92454d86fbc65c437fb483;
proxy_pass http://eosgateway/com.primeton.common.component;
# proxy_pass http://127.0.0.1:28085/com.primeton.common.component;
}
}
启动服务
启动服务时需要分别启动前后端应用,后端通过bin目录下的启动命令启动。前端则通过nginx加载配置启动。
后端启动
linux
[primeton@localhost allinone]$ ./bin/startup.sh
Windows:
D:\develop\allinone>./bin/startup.cmd
前端启动
linux
[root@localhost web]# nginx -s standalone.conf
Windows:
D:\develop\nginx-1.20.1>nginx.exe -s standalone.conf
环境登录及验证
访问http://localhost:port,使用初始用户登录,初始用户名、密码为:admin、000000。 用户正常登录并且能够看到资源目录菜单即可。
补充
待补充。
配置说明
环境访问问题
1.若无法访问,登录admin/000000,检查角色授权问题;
2.检查应用是否配置的Afenter应用是否一致;
3.检查应用与afcenter是否公用Redis;
4.检查nginx代理是否成功;
系统运行问题
1.检查业务字典是否正确;例如:元数据配置信息、ES配置信息等。