独立安装

文档中以MySQL数据安装为示例进行安装。

安装介质说明和准备

独立安装介质内置了AFcenter,无需再安装AFCenter环境。

独立安装介质目录如下:

Primeton_MDM_7.1_LA_Standalone
├── clearLog.cmd
├── clearLog.sh
├── readme.txt
├── server
│   ├── mdm
│   │   ├── bin
│   │   ├── config
│   │   ├── db-scripts
│   │   ├── lib
│   │   └── mdm-afc-boot-7.1.0-exec.jar // 主数据主程序
│   └── primetonlicense.xml
├── shutdown.cmd
├── shutdown.sh
├── startup.cmd
├── startup.sh
└── web
    ├── afcenter  //全部前端资源
    │   ├── assets
    │   ├── bfp
    │   ├── components
    │   ├── config
    │   ├── formDesigner
    │   ├── ide
    │   ├── index.html
    │   ├── mdm // 主数据前端资源
    │   ├── process
    │   ├── remoteEntry.js
    │   ├── remoteEntry.js.gz
    │   ├── static
    │   └── version.properties
    └── conf
        └── mdm.conf

确认版本证书是否过期

查看目录中文件server/primetonlicense.xml里 与当前时间对比是否过期

数据库初始化

创建数据库

创建mdm和mdm_pub两个数据库。执行如下脚本:

CREATE DATABASE `mdm` DEFAULT CHARACTER SET utf8mb4;
CREATE DATABASE `mdm_pub` DEFAULT CHARACTER SET utf8mb4;

执行初始化脚本

独立介质安装时需要按顺序执行EOS、AFCenter、MDM的数据库初始化脚本。初始化脚本路径为

Primeton_MDM_7.1_LA_Standalone/server/mdm/db-scripts,其中包括了EOS、AFCenter、MDM的脚本。

mdm数据库初始化,按顺序执行如下脚本:

eos/Mysql/00-eos-table.sql
eos/Mysql/01-eos-data.sql
eos/Mysql/02-quartz.sql
afcenter/Mysql/00-afc-table.sql
afcenter/Mysql/01-afc-data.sql
afccenter/upgrade/Mysql/all.sql
mdm/mysql/00-mdm-afc-data.sql
mdm/mysql/10-mdm-ddl.sql
mdm/mysql/11-mdm-data.sql

mdm_pub数据库初始化,执行如下脚本:

mdm/mysql/20-mdmpub-ddl.sql

添加驱动

下载对应数据库厂商的驱动到文件夹server/lib

数据库厂商 驱动名 版本
mysql mysql-connector-java 8.0.17
oracle ojdbc6 11.2.0.3
dameng DmJdbcDriver18 8.1.1.193
openGauss opengauss-jdbc 9.1:901

后端修改配置文件

不同数据库厂商修改成对应的属性
1.EOS配置文件:config/MDM/config/user-config.xml 修改两个数据源default与MDM_PUB配置(标签group):驱动DriverClass、Url、UserName、Password

        <group name="default">
            <configValue key="Database-Type">MySql</configValue># db类型
            <configValue key="Jdbc-Type"/>
            <configValue key="C3p0-DriverClass">com.mysql.cj.jdbc.Driver</configValue>#db驱动
            <configValue key="C3p0-Url">jdbc:驱动类型://IP:端口Port/mdm?useSSL=false</configValue>
            <configValue key="C3p0-UserName">用户名</configValue>
            <configValue key="C3p0-Password">密码</configValue>
            <configValue key="C3p0-PoolSize">5</configValue>
            <configValue key="C3p0-MaxPoolSize">30</configValue>
            <configValue key="C3p0-MinPoolSize">5</configValue>

            <!-- //seconds, 0 means connections never expire -->
            <configValue key="C3p0-MaxIdleTime">0</configValue>
            <!-- //idle connections never tested -->
            <configValue key="C3p0-IdleConnectionTestPeriod">0</configValue>
            <configValue key="C3p0-MaxStatements">0</configValue>
            <configValue key="C3p0-NumHelperThreads">3</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>
        <group name="MDM_PUB">
            <configValue key="Database-Type">MySql</configValue># db类型
            <configValue key="Jdbc-Type"/>
            <configValue key="C3p0-DriverClass">com.mysql.cj.jdbc.Driver</configValue>#db驱动
            <configValue key="C3p0-Url">jdbc:驱动类型://IP:端口Port/库db/mdm_pub?useSSL=false</configValue>
            <configValue key="C3p0-UserName">用户名</configValue>
            <configValue key="C3p0-Password">密码</configValue>
            <configValue key="C3p0-PoolSize">5</configValue>
            <configValue key="C3p0-MaxPoolSize">30</configValue>
            <configValue key="C3p0-MinPoolSize">5</configValue>

            <!-- //seconds, 0 means connections never expire -->
            <configValue key="C3p0-MaxIdleTime">0</configValue>
            <!-- //idle connections never tested -->
            <configValue key="C3p0-IdleConnectionTestPeriod">0</configValue>
            <configValue key="C3p0-MaxStatements">0</configValue>
            <configValue key="C3p0-NumHelperThreads">3</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>

2.主数据配置文件:config/application-mdm.properties
2.1 如果要更改端口,则修改
server.port=自己port
2.2 如果要更改db库厂商,则开放对应方言的注释

## MySQL   
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5Dialect   
#spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.DmDialect   
###GaussDB   
#spring.jpa.database=postgresql   
#spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQL9Dialect   
#spring.jpa.properties.hibernate.temp.use_jdbc_metadata_defaults = false   
## Oracle   
# spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.Oracle10gDialect   
## SQLServer   
# spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.SQLServer2012Dialect   

2.3 推送email配置:换成自己的服务器配置spring.mail:host、username、password、protocol

#email   
spring.mail.host=smtp.126.com #邮件服务协议地址   
spring.mail.username=jianggangli@126.com #用来发送邮件的邮箱地址   
spring.mail.password=RNGFEHNEKHJHVKKB #邮箱密码   
spring.mail.protocol=smtp #协议   
spring.mail.default-encoding=UTF-8   

前端配置

nginx网关配置server,前端静态资源、afc、mdm

server {
    listen 80;

    client_max_body_size 20M; #限制请求体的大小,默认是1M
    add_header X-Content-Type-Options nosniff;
    add_header X-XSS-Protection "1";
    add_header Content-Security-Policy "script-src * 'unsafe-inline' 'unsafe-eval'";
    add_header X-Frame-Options "SAMEORIGIN";
    add_header Strict-Transport-Security "max-age=SECONDS";
    add_header Referrer-Policy "no-referrer" always;
    add_header X-Permitted-Cross-Domain-Policies "master-only";
    add_header X-Download-Options noopen;

    location / {
            root  /XXX/afcenter;# 根据前端资源所在当前机器路径
            index  index.html index.htm;
    }
    location /afc {# 固定不变
            proxy_pass      http://后端部署IP:端口Port/;# 根据后端启动IP修改
    }
    location /afc/mdm {# 固定不变 mdm后端服务启动IP:Port
            proxy_pass      http://后端部署IP:端口Port/;# 根据后端启动IP修改
    }
}

启动服务

linux:
0.复制文件夹server/mdm到服务器运行目录
1.执行脚本:bin/startup.sh,并查看日志logs/eos-trace.log是否有错
2.启动nginx: /usr/local/nginx/sbin/nginx -s start
3.访问http://nginx机器IP:前端Port,确认是否显示首页

windows:
0.复制文件夹server/mdm到服务器运行目录
1.执行脚本:bin/startup.cmd,并查看日志logs/eos-trace.log是否有错
2.启动nginx: nginx.exe -s start
3.访问http://nginx机器IP:前端Port,确认是否显示首页

环境登录和验证

访问http://nginx机器IP:前端Port,使用初始用户登录,用户名/密码为:admin/000000

1.进入[组织权限中心]->[账号管理]->[账号:admin] 2.点击角色进行添加角色【主数据管理员】 3.刷新页面,看导航栏多出一个模块【主数据】,点击即可展示左侧主数据的菜单与主数据首页

补充

高斯数据库的upgrade存在语法错误,需要更新。

对应错误脚本:

ALTER TABLE AFC_SYSTEM_VARIABLE MODIFY COLUMN VALUE VARCHAR(1024);

需要将以上脚本修改为如下内容再进行执行:

alter table afc_system_variable alter column value type varchar(1024) using value::varchar(1024);

comment on column afc_system_variable.value is '扩展系统变量值';

results matching ""

    No results matching ""