---
title: 更新License
description: "1. 停止数据库服务。"
url: https://www.hikunpeng.com/document/detail/zh/kunpengdevps/portingadvisor/systemmigration/DevKit_Porting_0062.html
sourcePath: /source/zh/kunpengdevps/portingadvisor/systemmigration/DevKit_Porting_0062.html
indexId: addb2f42b1aa29a667c1e2cb62dd2146752fc0b68a1543e414f670f8c4c8728f79
---
# 更新License

#### 达梦数据库更新License

1. 停止数据库服务。
2. 进入数据库安装目录“/home/dmdba/dmdbms/bin”，将原有的dm.key进行备份。
3. 将获取的永久证书dm.key复制到数据库安装目录“/home/dmdba/dmdbms/bin”，重启数据库服务。


#### 金仓数据库更新License

1. 进入数据库安装目录“/opt/Kingbase/ES/V8/KESRealPro/V008R006C008B0020/”。
2. 在该目录下，将license.dat替换为最新License，名称保持不变。
3. 重新建立 软链接 。
  1 ln -s /opt/Kingbase/ES/V8/KESRealPro/V008R006C008B0020/license.dat /opt/Kingbase/ES/V8/license.dat

4. 重启数据库服务。
  1 /opt/Kingbase/ES/V8/Server/bin/sys_ctl -D /opt/Kingbase/ES/V8/data restart

  关于金仓数据库License更多信息，请参见金仓数据库官方文档(https://help.kingbase.com.cn/v8/install-updata/license-information/index.html)。


#### 宝兰德BES更新License

1. 上传License文件至宝兰德BES_AppServer安装路径的license目录下。
2. 执行以下命令修改License文件属主、属组及权限。
  1 2 chown bes:bes ${licenseFile} chmod 700 ${licenseFile}

  ${licenseFile}：表示License文件绝对路径，且文件名必须为bes.lic.txt，例如：/home/bes/bes_appserver_standard_9.5.5.7266/license/bes.lic.txt。

3. 如果之前已启动宝兰德BES_AppServer，执行以下命令停止服务。
  1 2 3 su - bes cd ${bes_appserver}/bin ./iastool --user admin --passwordfile ../conf/.passwordfile stop --server

  如果返回结果中包含“Command stop --server executed successfully.”，则表示停止成功。

  ${bes_appserver}：表示宝兰德BES_AppServer安装目录，请根据实际情况进行替换。

4. 导入许可证。
  1 ./lmadm import-lic --sourcepath=${licensePath}

  如果返回结果中包含“License xxx.txt has been imported into /home/bes/bes_appserver_standard_9.5.5.7266/license/bes.lic successfully.”，则表示许可证导入成功。

  ${licensePath}：表示放置许可证目录的绝对路径，例如：/home/bes/bes_appserver_standard_9.5.5.7266/license。


#### TongWeb更新License

1. 进入TongWeb安装目录，将license.dat替换为最新License，名称保持不变。
2. 新开一个目标服务器窗口，前往TongWeb安装目录下的bin目录执行以下命令终止服务。
  1 bash stopserver.sh

3. 重新启动服务。
  1 bash startserver.sh
