wsl docker安装达梦数据库的过程

参考文档,麒麟系统kylinServerV10中在docker中安装达梦数据库

基本上完全按照他的步骤操作。什么都没干,日志就有8GB。不知道第一遍初始化没带用户名口令是他误操作,还是必须的过程。这是我见过最复杂的docker安装步骤。

复制代码
C:\d>wget http://download.dameng.com/eco/dm8/dm8_20250206_x86_rh6_rq_single.tar
--2025-12-24 21:24:15--  http://download.dameng.com/eco/dm8/dm8_20250206_x86_rh6_rq_single.tar
Resolving download.dameng.com (download.dameng.com)... 120.201.235.30
Connecting to download.dameng.com (download.dameng.com)|120.201.235.30|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 824758272 (787M) [application/octet-stream]
Saving to: 'dm8_20250206_x86_rh6_rq_single.tar'

dm8_20250206_x86_rh6_rq_singl 100%[=================================================>] 786.55M   872KB/s    in 22m 14s

2025-12-24 21:46:29 (604 KB/s) - 'dm8_20250206_x86_rh6_rq_single.tar' saved [824758272/824758272]


C:\d>wsl
root@DESKTOP-59T6U68:/mnt/c/d# docker load -i ./dm8_20250206_x86_rh6_rq_single.tar
Getting image source signatures
Copying blob c709c635d729 done
Copying blob 686245e78935 done
Copying blob d7ff1dc646ba done
Copying blob d73dd9e65295 done
Copying blob c853b6a23c2c done
Copying blob 644879075e24 done
Copying blob 2de391e51d73 done
Copying blob 3827eb1a7e43 done
Copying blob 3e10e7cfd329 done
Copying blob 41e82b7aea0d done
Copying blob 4f883f5c5226 done
Copying blob f7fc888ee549 done
Copying blob 7973cb98d0ee done
Copying blob ad1316e6925a done
Copying blob 3675bac58c83 done
Copying blob dfdac1529c8f done
Copying blob 6aae571fed32 done
Copying blob 0bad54ddcda7 done
Copying blob c2de638ff6e8 done
Copying blob 940066871610 done
Copying blob e7d4062c0986 done
Copying blob 7448d9bdfd35 done
Copying blob 71f110d9117f done
Copying blob 301b2d807eac done
Copying blob 38e8298063b6 done
Copying blob 4bb12250dd50 done
Copying blob b3bf4a6c5618 done
Copying config 06e711491c done
Writing manifest to image destination
Storing signatures
Loaded image(s): localhost/dm8:dm8_20250206_rev257733_x86_rh6_64
root@DESKTOP-59T6U68:/mnt/c/d# docker image list -a|find dm
find: 'dm': No such file or directory
root@DESKTOP-59T6U68:/mnt/c/d# docker image list -a|grep dm
localhost/dm8                                                           dm8_20250206_rev257733_x86_rh6_64  06e711491c23  13 months ago  825 MB
root@DESKTOP-59T6U68:/mnt/c/d# docker run -d --name dm8 -p 5236:5236 -v /mnt/c/d/dmdata:/opt/dmdbms/data dm8:dm8_2025020
6_rev257733_x86_rh6_64
03671a2259a0e92427edddcf4652b2ff2c3ded028e13be60ad637f51687296d1
root@DESKTOP-59T6U68:/mnt/c/d# docker exec -it dm8 /bin/bash
root@03671a2259a0:/# cd /opt/dmdbms/bin
root@03671a2259a0:/opt/dmdbms/bin# ./dminit PATH=/opt/dmdbms/data
initdb V8
db version: 0x7000d
file dm.key not found, use default license!
License will expire on 2026-01-17
please set [SYSDBA_PWD] value. Passwords length [8, 48], contain uppercase and lowercase characters combined with numbers.
fail to init db.
root@03671a2259a0:/opt/dmdbms/bin# ./dminit PATH=/opt/dmdbms/data SYSDBA_PWD=Dameng123!  SYSAUDITOR_PWD=Auditor@123
initdb V8
db version: 0x7000d
file dm.key not found, use default license!
License will expire on 2026-01-17
The instance /opt/dmdbms/data/DAMENG is running.
The instance /opt/dmdbms/data/DAMENG is running or check instance active failed.
You may get more details in file ../log/dm_DMSERVER_202512.log
fail to init db.
root@03671a2259a0:/opt/dmdbms/bin# ps -ef | grep dmserve
dmdba        120      32  4 21:49 ?        00:00:03 /opt/dmdbms/bin/dmserver /opt/dmdbms/data/DAMENG/dm.ini -noconsole
root         373      53  0 21:51 pts/0    00:00:00 grep --color=auto dmserve
root@03671a2259a0:/opt/dmdbms/bin# kill -9 dmserver
bash: kill: dmserver: arguments must be process or job IDs
root@03671a2259a0:/opt/dmdbms/bin# kill -9 120
root@03671a2259a0:/opt/dmdbms/bin# ps -ef | grep dmserve
root         407      53  0 21:51 pts/0    00:00:00 grep --color=auto dmserve
root@03671a2259a0:/opt/dmdbms/bin# ./dminit PATH=/opt/dmdbms/data SYSDBA_PWD=Dameng123!  SYSAUDITOR_PWD=Auditor@123
initdb V8
db version: 0x7000d
file dm.key not found, use default license!
License will expire on 2026-01-17
Normal of FAST
Normal of DEFAULT
Normal of RECYCLE
Normal of KEEP
Normal of ROLL

 log file path: /opt/dmdbms/data/DAMENG/DAMENG01.log


 log file path: /opt/dmdbms/data/DAMENG/DAMENG02.log

FILE "/opt/dmdbms/data/DAMENG/dm.ini" has already existed
FILE "/opt/dmdbms/data/DAMENG/sqllog.ini" has already existed
FILE "/opt/dmdbms/data/DAMENG/SYSTEM.DBF" has already existed
FILE "/opt/dmdbms/data/DAMENG/ROLL.DBF" has already existed
FILE "/opt/dmdbms/data/DAMENG/MAIN.DBF" has already existed
FILE "/opt/dmdbms/data/DAMENG/dm.ctl" has already existed
FILE "/opt/dmdbms/data/DAMENG/DAMENG01.log" has already existed
FILE "/opt/dmdbms/data/DAMENG/DAMENG02.log" has already existed
File "/opt/dmdbms/data/DAMENG/dm.ini" has already existed,
whether overwrite(y/n, 1/0): y
File "/opt/dmdbms/data/DAMENG/sqllog.ini" has already existed,
whether overwrite(y/n, 1/0): y
File "/opt/dmdbms/data/DAMENG/SYSTEM.DBF" has already existed,
whether overwrite(y/n, 1/0): y
File "/opt/dmdbms/data/DAMENG/ROLL.DBF" has already existed,
whether overwrite(y/n, 1/0): y
File "/opt/dmdbms/data/DAMENG/MAIN.DBF" has already existed,
whether overwrite(y/n, 1/0): y
File "/opt/dmdbms/data/DAMENG/dm.ctl" has already existed,
whether overwrite(y/n, 1/0): y
File "/opt/dmdbms/data/DAMENG/DAMENG01.log" has already existed,
whether overwrite(y/n, 1/0): y
File "/opt/dmdbms/data/DAMENG/DAMENG02.log" has already existed,
whether overwrite(y/n, 1/0): y
write to dir [/opt/dmdbms/data/DAMENG].
create dm database success. 2025-12-24 21:57:45
root@03671a2259a0:/opt/dmdbms/bin# ls -l /opt/dmdbms/data/DAMENG/
total 8671332
-rwxrwxrwx 1 root root 4294967296 Dec 24 21:55 DAMENG01.log
-rwxrwxrwx 1 root root 4294967296 Dec 24 21:57 DAMENG02.log
drwxrwxrwx 1 root root       4096 Dec 24 21:49 HMAIN
-rwxrwxrwx 1 root root  134217728 Dec 24 21:57 MAIN.DBF
-rwxrwxrwx 1 root root  134217728 Dec 24 21:57 ROLL.DBF
-rwxrwxrwx 1 root root   10485760 Dec 24 21:57 SYSTEM.DBF
-rwxrwxrwx 1 root root   10485760 Dec 24 21:49 TEMP.DBF
drwxrwxrwx 1 root root       4096 Dec 24 21:49 bak
drwxrwxrwx 1 root root       4096 Dec 24 21:57 ctl_bak
-rwxrwxrwx 1 root root       5632 Dec 24 21:57 dm.ctl
-rwxrwxrwx 1 root root      81741 Dec 24 21:53 dm.ini
-rwxrwxrwx 1 root root        633 Dec 24 21:57 dm_service.prikey
-rwxrwxrwx 1 root root        982 Dec 24 21:49 dminit20251224214901.log
-rwxrwxrwx 1 root root        982 Dec 24 21:57 dminit20251224215154.log
-rwxrwxrwx 1 root root        714 Dec 24 21:53 sqllog.ini
drwxrwxrwx 1 root root       4096 Dec 24 21:49 trace
root@03671a2259a0:/opt/dmdbms/bin# ps -ef | grep dmserver
root         865      53  0 21:59 pts/0    00:00:00 grep --color=auto dmserver
root@03671a2259a0:/opt/dmdbms/bin# ./dmserver /opt/dmdbms/data/DAMENG/dm.ini
file dm.key not found, use default license!
version info: develop
csek2_vm_t = 1440
nsql_vm_t = 328
prjt2_vm_t = 176
ltid_vm_t = 216
nins2_vm_t = 1120
nset2_vm_t = 272
ndlck_vm_t = 192
ndel2_vm_t = 768
slct2_vm_t = 352
nli2_vm_t = 200
aagr2_vm_t = 304
pscn_vm_t = 376
dist_vm_t = 960
DM Database Server 64 V8 03134284336-20250117-257733-20132 startup...
Normal of FAST
Normal of DEFAULT
Normal of RECYCLE
Normal of KEEP
Normal of ROLL
Database mode = 0, oguid = 0
License will expire on 2026-01-17
file lsn: 0
ndct db load finished, code:0
ckpt2_exec_immediately begin.
checkpoint begin, used_space[4096], free_space[8589922304]...
checkpoint end, 2 pages flushed, used_space[8192], free_space[8589918208].
checkpoint begin, used_space[8192], free_space[8589918208]...
checkpoint begin, used_space[0], free_space[8589926400]...
ndct second level fill fast pool finished
ndct third level fill fast pool finished
ndct second level fill fast pool finished
ndct third level fill fast pool finished
ndct fill fast pool finished
pseg_set_gtv_trxid_low next_trxid in mem:[2002]
pseg_collect_mgr_items, total collect 0 active_trxs, 0 cmt_trxs, 0 pre_cmt_trxs, 0 to_release_trxs, 0 active_pages, 0 cmt_pages, 0 pre_cmt_pages, 0 to_release_pages, 0 mgr pages, 0 mgr recs!
next_trxid in mem:[4004]
next_trxid = 6006.
pseg recv finished
nsvr_startup end.
uthr_pipe_create, create pipe[read:10, write:11]
...
uthr_pipe_create, create pipe[read:40, write:41]
aud sys init success.
aud rt sys init success.
trx: 6007 purged 1 pages
...
trx: 6762 purged 1 pages
trx: 6764 purged 1 pages
systables desc init success.
ndct_db_load_info finished, code:0.
nsvr_process_before_open begin.
nsvr_process_before_open success.
SYSTEM IS READY.
checkpoint requested by INI_INTERVAL, rlog free space[8577966080], used space[11960320]
checkpoint generate by ckpt_interval
checkpoint begin, used_space[11960320], free_space[8577966080]...
checkpoint end, 0 pages flushed, used_space[16384], free_space[8589910016].

-------另外启动一个控制台窗口,用客户端访问服务端

复制代码
Microsoft Windows [版本 10.0.26100.6899]
(c) Microsoft Corporation。保留所有权利。

C:\Users\lt>cd \d

C:\d>wsl
root@DESKTOP-59T6U68:/mnt/c/d# docker exec -it dm8 /bin/bash


root@03671a2259a0:/# cd /opt/dmdbms/bin
root@03671a2259a0:/opt/dmdbms/bin# ./disql 'SYSDBA/Dameng123!@localhost:5236'

Server[localhost:5236]:mode is normal, state is open
login used time : 3.971(ms)
disql V8
SQL> SELECT * FROM v$version;

LINEID     BANNER
---------- ---------------------------------
1          DM Database Server 64 V8
2          DB Version: 0x7000d
3          03134284336-20250117-257733-20132
4          Msg Version: 32
5          Gsu level(5) cnt: 0

used time: 4.202(ms). Execute id is 66301.
SQL> SELECT USER;

LINEID     USER
---------- ------
1          SYSDBA

used time: 2.384(ms). Execute id is 66302.

SQL> WITH FUNCTION f1(C INT) RETURN INT AS BEGIN RETURN C* 10; END;
2   SELECT f1(5236) FROM DUAL;
3   /

LINEID     F1(5236)
---------- -----------
1          52360

used time: 2.382(ms). Execute id is 66303.
相关推荐
银发控、7 小时前
MySQL联合索引
数据库·mysql
予枫的编程笔记7 小时前
【MySQL修炼篇】从踩坑到精通:事务隔离级别的3大异常(脏读/幻读/不可重复读)解决方案
数据库·mysql·后端开发·数据库事务·事务隔离级别·rr级别·脏读幻读不可重复读
一起养小猫8 小时前
Flutter for OpenHarmony 实战:记账应用数据统计与可视化
开发语言·jvm·数据库·flutter·信息可视化·harmonyos
世界尽头与你8 小时前
(修复方案)CVE-2023-22047: Oracle PeopleSoft Enterprise PeopleTools 未授权访问漏洞
数据库·安全·oracle·渗透测试
韩立学长8 小时前
【开题答辩实录分享】以《智能大学宿舍管理系统的设计与实现》为例进行选题答辩实录分享
数据库·spring boot·后端
Henry Zhu1238 小时前
数据库(五):反规范化
数据库
Mr_Xuhhh9 小时前
MySQL函数详解:日期、字符串、数学及其他常用函数
java·数据库·sql
he___H10 小时前
Redis高级数据类型
数据库·redis·缓存
霖霖总总10 小时前
[小技巧60]深入解析 MySQL Online DDL:MySQL Online DDL、pt-osc 与 gh-ost 机制与最佳实践
数据库·mysql
爱学习的阿磊10 小时前
使用PyTorch构建你的第一个神经网络
jvm·数据库·python