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.
相关推荐
Zenova EdgeOS15 小时前
Rust 数据库实战:工业边缘场景下的 sqlx
数据库·oracle·rust·边缘计算·工业网关
喜欢打篮球的普通人15 小时前
PyTorch Dispatch 机制:一张二维表解释一切
java·前端·数据库
qq_张文15 小时前
mysql 主从同步
数据库·mysql
Monkey的自我迭代16 小时前
K8S详细学习1——为什么选择k8s
学习·docker·kubernetes
DataY轻量数据平台16 小时前
从 Kafka 到数据库,只差一个“数据格式转换”组件
数据库·分布式·kafka
zjeweler16 小时前
Nginx 502 Bad Gateway怎么解决?Docker反代与PHP-FPM报错全链路排查
nginx·docker·php-fpm·502 bad gateway·实用建站
我不会起名字32216 小时前
ClickHouse 写入与存储边界:MergeTree 合并风暴与大宽表的 4 个取舍
数据库·clickhouse·mergetree·存储架构·大宽表
普通人616 小时前
MySQL 特殊场景启动命令完全指南(8.0 / 5.7 差异全标注)
数据库·mysql·adb
parade岁月19 小时前
没有称手工具了怎么办?搓一个!AI 时代顺手造了个单文件 Mermaid ER 查看器
数据库·后端
hryou09221 天前
向量库选型别踩坑:10个候选、6个暗坑,一次说清
数据库·架构