DM8 Docker环境部署
1 环境说明
类别 版本 介质
操作系统 CentOS-7-x86_64-DVD-2207-02.iso
docker-27.3.1.tgz
Dm8 Docker DM8开发版 dm8_20241119_x86_rh6_64_rq_ent_8.1.2.84.tar
备注:
下载docker源码包
下载地址: https://download.docker.com/linux/static/stable/x86_64/
2 Docker安装(离线安装)
上传并解压docker
docker-27.3.1.tgz`上传至/opt目录
[root@localhost ~]# cd /opt
[root@localhost opt]# tar -zxvf docker-27.3.1.tgz
docker/
docker/docker-init
docker/ctr
docker/containerd
docker/containerd-shim-runc-v2
docker/dockerd
docker/docker-proxy
docker/docker
docker/runc
2.1 文件移到/usr/bin
[root@localhost opt]# cp -rp /opt/docker/* /usr/bin/
2.2 注册docker为系统服务
vi /etc/systemd/system/docker.service
添加如下内容
[Unit]
Description=Docker Application Container Engine
Documentation=docker官网下载
After=network-online.target firewalld.service
Wants=network-online.target
[Service]
Type=notify
# the default is not to use systemd for cgroups because the delegate issues still
# exists and systemd currently does not support the cgroup feature set required
# for containers run by docker
ExecStart=/usr/bin/dockerd
ExecReload=/bin/kill -s HUP $MAINPID
# Having non-zero Limit*s causes performance problems due to accounting overhead
# in the kernel. We recommend using cgroups to do container-local accounting.
LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
# Uncomment TasksMax if your systemd version supports it.
# Only systemd 226 and above support this version.
#TasksMax=infinity
TimeoutStartSec=0
# set delegate yes so that systemd does not reset the cgroups of docker containers
Delegate=yes
# kill only the docker process, not all processes in the cgroup
KillMode=process
# restart the docker process if it exits prematurely
Restart=on-failure
StartLimitBurst=3
StartLimitInterval=60s
[Install]
WantedBy=multi-user.target
2.3 添加权限
添加权限后启动
chmod +x /etc/systemd/system/docker.service
2.4 重新加载配置文件
systemctl daemon-reload
2.5 Docker启动
systemctl start docker
systemctl enable docker
如果有如下报错,检查vi /etc/systemd/system/docker.service文件是否配置错误。
[root@localhost opt]# systemctl enable docker
Failed to execute operation: Bad message
2.6 查看docker状态
systemctl status docker
[root@localhost opt]# systemctl status docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/etc/systemd/system/docker.service; enabled; vendor preset: disabled)
Active: active (running) since Mon 2024-11-25 10:20:07 CST; 5min ago
Main PID: 77483 (dockerd)
CGroup: /system.slice/docker.service
├─77483 /usr/bin/dockerd
└─77492 containerd --config /var/run/docker/containerd/containerd.toml
Nov 25 10:20:04 localhost.localdomain dockerd[77483]: time="2024-11-25T10:20:04.942050795+08:00" level=info msg="Loading containers: start."
Nov 25 10:20:06 localhost.localdomain dockerd[77483]: time="2024-11-25T10:20:06.919729506+08:00" level=info msg="Firewalld: interface docker0 already part of docker ...returning"
Nov 25 10:20:07 localhost.localdomain dockerd[77483]: time="2024-11-25T10:20:07.040765503+08:00" level=info msg="Loading containers: done."
Nov 25 10:20:07 localhost.localdomain dockerd[77483]: time="2024-11-25T10:20:07.107359443+08:00" level=warning msg="WARNING: bridge-nf-call-iptables is disabled"
Nov 25 10:20:07 localhost.localdomain dockerd[77483]: time="2024-11-25T10:20:07.107387930+08:00" level=warning msg="WARNING: bridge-nf-call-ip6tables is disabled"
Nov 25 10:20:07 localhost.localdomain dockerd[77483]: time="2024-11-25T10:20:07.107412661+08:00" level=info msg="Docker daemon" commit=41ca978 containerd-snapshotter...ion=27.3.1
Nov 25 10:20:07 localhost.localdomain dockerd[77483]: time="2024-11-25T10:20:07.111350980+08:00" level=info msg="Daemon has completed initialization"
Nov 25 10:20:07 localhost.localdomain dockerd[77483]: time="2024-11-25T10:20:07.146931926+08:00" level=info msg="API listen on /var/run/docker.sock"
Nov 25 10:20:07 localhost.localdomain systemd[1]: Started Docker Application Container Engine.
Nov 25 10:24:16 localhost.localdomain systemd[1]: [/etc/systemd/system/docker.service:3] Invalid URL, ignoring: docker官网下载
Hint: Some lines were ellipsized, use -l to show in full.
[root@localhost opt]#
2.7查看docker版本
docker version
[root@localhost opt]# docker version
Client:
Version: 27.3.1
API version: 1.47
Go version: go1.22.7
Git commit: ce12230
Built: Fri Sep 20 11:39:44 2024
OS/Arch: linux/amd64
Context: default
Server: Docker Engine - Community
Engine:
Version: 27.3.1
API version: 1.47 (minimum version 1.24)
Go version: go1.22.7
Git commit: 41ca978
Built: Fri Sep 20 11:41:02 2024
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: v1.7.22
GitCommit: 7f7fdf5fed64eb6a7caf99b3e12efcf9d60e311c
runc:
Version: 1.1.14
GitCommit: v1.1.14-0-g2c9f560
docker-init:
Version: 0.19.0
GitCommit: de40ad0
[root@localhost opt]#
到此docker安装完成。
2.8Docker简单查询
[root@localhost opt]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
[root@localhost opt]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
[root@localhost opt]#
docker images:本地镜像
docker ps:活动的docker(正在运行的)
这里没有任何东西,因为只安装了docker软件,应用或者数据库都还没有开始部署。
3 DM8 docker镜像云版本安装
3.1 下载DM8 Docker镜像
https://eco.dameng.com/download/
3.2 拷贝安装包到 /opt 目录下,执行以下命令导入安装包:
docker load -i /opt/dm8_20230808_rev197096_x86_rh6_64_single.tar
结果如下
[root@localhost opt]# docker load -i /opt/dm8_20241119_x86_rh6_64_rq_ent_8.1.2.84.tar
644879075e24: Loading layer [==================================================>] 117.9MB/117.9MB
d7ff1dc646ba: Loading layer [==================================================>] 15.87kB/15.87kB
686245e78935: Loading layer [==================================================>] 14.85kB/14.85kB
d73dd9e65295: Loading layer [==================================================>] 5.632kB/5.632kB
2de391e51d73: Loading layer [==================================================>] 3.072kB/3.072kB
c709c635d729: Loading layer [==================================================>] 101.3MB/101.3MB
c853b6a23c2c: Loading layer [==================================================>] 2.56kB/2.56kB
3e10e7cfd329: Loading layer [==================================================>] 4.096kB/4.096kB
41e82b7aea0d: Loading layer [==================================================>] 153.6kB/153.6kB
3827eb1a7e43: Loading layer [==================================================>] 843.3kB/843.3kB
4f883f5c5226: Loading layer [==================================================>] 4.608kB/4.608kB
7973cb98d0ee: Loading layer [==================================================>] 4.711MB/4.711MB
95ae5fbafc50: Loading layer [==================================================>] 256.6MB/256.6MB
c6bb2b624383: Loading layer [==================================================>] 2.56kB/2.56kB
c31e1f95a1b0: Loading layer [==================================================>] 2.56kB/2.56kB
15d2c5587a3a: Loading layer [==================================================>] 2.56kB/2.56kB
9fc1dd647764: Loading layer [==================================================>] 5.12kB/5.12kB
653202d59bf4: Loading layer [==================================================>] 5.12kB/5.12kB
43f0ff047f07: Loading layer [==================================================>] 4.608kB/4.608kB
80ec3c7084a4: Loading layer [==================================================>] 3.072kB/3.072kB
83d164fdbe11: Loading layer [==================================================>] 15.36kB/15.36kB
c7fa2fc69275: Loading layer [==================================================>] 15.36kB/15.36kB
4123177c9851: Loading layer [==================================================>] 2.56kB/2.56kB
07535158b659: Loading layer [==================================================>] 4.096kB/4.096kB
de48c63e339e: Loading layer [==================================================>] 4.096kB/4.096kB
4c4a9a1264e7: Loading layer [==================================================>] 4.096kB/4.096kB
ecf5f6d53d2e: Loading layer [==================================================>] 4.096kB/4.096kB
Loaded image: dm8:dm8_20241119_rev149328_x86_rh6_64
3.3查看DM8镜像
导入完成后,可以使用docker images查看导入的镜像。结果显示如下:
docker images
执行结果如下:
[root@localhost opt]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
dm8 dm8_20241119_rev149328_x86_rh6_64 c93455c943a1 5 days ago 473MB
TAG:云版本DM8版本号
IMAGE ID:导入镜像ID号
3.4 创建容器
镜像导入后,使用docker run启动容器,启动命令如下:
备注:达梦最新的版本已经取消了LENGTH_IN_CHAR参数,此案例主要是测试LENGTH_IN_CHAR的功能,故而加了此参数。
docker run -d -p 30236:5236 --restart=always --name=dm8_test --privileged=true -e LD_LIBRARY_PATH=/opt/dmdbms/bin -e PAGE_SIZE=16 -e EXTENT_SIZE=32 -e LOG_SIZE=1024 -e UNICODE_FLAG=1 -e LENGTH_IN_CHAR=1 -e INSTANCE_NAME=dm8_test -v /opt/data:/opt/dmdbms/data dm8:dm8_20241119_rev149328_x86_rh6_64
执行结果:
[root@localhost opt]# docker run -d -p 30236:5236 --restart=always --name=dm8_test --privileged=true -e LD_LIBRARY_PATH=/opt/dmdbms/bin -e PAGE_SIZE=16 -e EXTENT_SIZE=32 -e LOG_SIZE=1024 -e UNICODE_FLAG=1 -e LENGTH_IN_CHAR=1 -e INSTANCE_NAME=dm8_test -v /opt/data:/opt/dmdbms/data dm8:dm8_20241119_rev149328_x86_rh6_64
5961fb86f53152afab9016480e768f135bf446c4a7b750d43913b0ff9a33d9a0
容器运行相关参数说明:
参数名 参数描述
使用 -e 命令指定数据库初始化参数时,需要注意的是目前只支持预设以下九个 DM 参数。
注意
1.SYSDBA_PWD 预设的时候,密码长度为 9~48 个字符,docker 版本使用暂不支持特殊字符为密码。
2.-e 设置的时候 初始化参数必须使用大写,不可使用小写。
3.5 查看 Docker 镜像中数据库初始化的参数
docker inspect dm8_test
执行结果如下:
找到 Env 项可以看到在数据库初始化时设置的参数值,包括页大小(PAGE_SIZE)、簇大小(EXTENT_SIZE)、字符集(UNICODE_FLAG)、默认密码(SYSDBA_PWD)等。
[root@localhost opt]# docker inspect dm8_test
[
{
"Id": "5961fb86f53152afab9016480e768f135bf446c4a7b750d43913b0ff9a33d9a0",
"Created": "2024-11-25T02:49:49.042446003Z",
"Path": "/opt/startup.sh",
"Args": [],
"State": {
"Status": "running",
"Running": true,
"Paused": false,
"Restarting": false,
"OOMKilled": false,
"Dead": false,
"Pid": 78312,
"ExitCode": 0,
"Error": "",
"StartedAt": "2024-11-25T02:49:49.493254696Z",
"FinishedAt": "0001-01-01T00:00:00Z"
},
"Image": "sha256:c93455c943a1e3710499732bc2a96a80360a88e86d1718e7be573d242b2591c0",
"ResolvConfPath": "/var/lib/docker/containers/5961fb86f53152afab9016480e768f135bf446c4a7b750d43913b0ff9a33d9a0/resolv.conf",
"HostnamePath": "/var/lib/docker/containers/5961fb86f53152afab9016480e768f135bf446c4a7b750d43913b0ff9a33d9a0/hostname",
"HostsPath": "/var/lib/docker/containers/5961fb86f53152afab9016480e768f135bf446c4a7b750d43913b0ff9a33d9a0/hosts",
"LogPath": "/var/lib/docker/containers/5961fb86f53152afab9016480e768f135bf446c4a7b750d43913b0ff9a33d9a0/5961fb86f53152afab9016480e768f135bf446c4a7b750d43913b0ff9a33d9a0-json.log",
"Name": "/dm8_test",
"RestartCount": 0,
"Driver": "overlay2",
"Platform": "linux",
"MountLabel": "",
"ProcessLabel": "",
"AppArmorProfile": "",
"ExecIDs": null,
"HostConfig": {
"Binds": [
"/opt/data:/opt/dmdbms/data"
],
"ContainerIDFile": "",
"LogConfig": {
"Type": "json-file",
"Config": {}
},
"NetworkMode": "bridge",
"PortBindings": {
"5236/tcp": [
{
"HostIp": "",
"HostPort": "30236"
}
]
},
"RestartPolicy": {
"Name": "always",
"MaximumRetryCount": 0
},
"AutoRemove": false,
"VolumeDriver": "",
"VolumesFrom": null,
"ConsoleSize": [
58,
178
],
"CapAdd": null,
"CapDrop": null,
"CgroupnsMode": "host",
"Dns": [],
"DnsOptions": [],
"DnsSearch": [],
"ExtraHosts": null,
"GroupAdd": null,
"IpcMode": "private",
"Cgroup": "",
"Links": null,
"OomScoreAdj": 0,
"PidMode": "",
"Privileged": true,
"PublishAllPorts": false,
"ReadonlyRootfs": false,
"SecurityOpt": [
"label=disable"
],
"UTSMode": "",
"UsernsMode": "",
"ShmSize": 67108864,
"Runtime": "runc",
"Isolation": "",
"CpuShares": 0,
"Memory": 0,
"NanoCpus": 0,
"CgroupParent": "",
"BlkioWeight": 0,
"BlkioWeightDevice": [],
"BlkioDeviceReadBps": [],
"BlkioDeviceWriteBps": [],
"BlkioDeviceReadIOps": [],
"BlkioDeviceWriteIOps": [],
"CpuPeriod": 0,
"CpuQuota": 0,
"CpuRealtimePeriod": 0,
"CpuRealtimeRuntime": 0,
"CpusetCpus": "",
"CpusetMems": "",
"Devices": [],
"DeviceCgroupRules": null,
"DeviceRequests": null,
"MemoryReservation": 0,
"MemorySwap": 0,
"MemorySwappiness": null,
"OomKillDisable": false,
"PidsLimit": null,
"Ulimits": [],
"CpuCount": 0,
"CpuPercent": 0,
"IOMaximumIOps": 0,
"IOMaximumBandwidth": 0,
"MaskedPaths": null,
"ReadonlyPaths": null
},
"GraphDriver": {
"Data": {
"LowerDir": "/var/lib/docker/overlay2/d81161a252d96e94ec50a23638f46074d552c5b42a4a5aca1b2667387da0166f-init/diff:/var/lib/docker/overlay2/b06e577e675896814b64de79765f70c74f8e51aa7ff2613463d667144c32607e/diff:/var/lib/docker/overlay2/eeb42cb97b1b948e4e26dbe6694cd1946f8647d89bf9e8d3900d9bc7b5055c89/diff:/var/lib/docker/overlay2/f8e0c20b8a2b8d23a653ae0f92110e87fd4732c1b1e3e503ab8c3ae2506c185b/diff:/var/lib/docker/overlay2/555b3c15bd7e0eba1ce57ad6d21bcd19c8560b1362f5194ed9588729e821f504/diff:/var/lib/docker/overlay2/bf05b99bf62959371f503f060fc65d61b4ad1048eb4dc86f6efe043d94dd4907/diff:/var/lib/docker/overlay2/38bf2080fb48d2d70ba18add38bf4c281f089f557d8fde5137d7742acdeab55d/diff:/var/lib/docker/overlay2/10bef8105a9aad58fb05db31f2509a2beb4376a246f696fa6f8200cb579b7a88/diff:/var/lib/docker/overlay2/c541ae456bed6c0ab4ac92ac69e10e94e8366da528e3d48d186438da94b3f131/diff:/var/lib/docker/overlay2/fb7f6c4d63279b7e3336c43f83d1cc57212762ae7aff78d713bd50fe20eeb59a/diff:/var/lib/docker/overlay2/d53f6615e182de0ab76ce8fb5aea71edaaad38e4e8b552f04f7d447a5fd5dfab/diff:/var/lib/docker/overlay2/fbd8c82072619e6e729bcd44bbd5782f44f86d9d50ce17332be154508bb18314/diff:/var/lib/docker/overlay2/461fa79ea5f197272777513bf508ff7dad42f37d6a82b1a8ff5188e7fc95461e/diff:/var/lib/docker/overlay2/469be74b6c49b2390fc35581fe2a3f329ad1b3046117af7a2136b2ffbccb3018/diff:/var/lib/docker/overlay2/1ae4b43c47c9b65551a1d2a6ac8beab638d0a7fc48668022919611dcffc470f7/diff:/var/lib/docker/overlay2/d8ab98cf99d377b093c61ec8545ff0cf93ae98e41afcc29d8c2fe3f0f853590e/diff:/var/lib/docker/overlay2/4cb9e52c5c21b97cbd81e434da224fb7d37bcb47fce77c67c2922ec217641132/diff:/var/lib/docker/overlay2/2ded490b3403766c956afd22d5261eb502ec1f3d83085edb815cc30ea19c5a67/diff:/var/lib/docker/overlay2/bf3bb66d319083cbe2af6fbb518be765b2236a74602b539c3d91a17558450a91/diff:/var/lib/docker/overlay2/cc8358a104ab4505cb48b7f8c35edd8c537d3feed392aab4c77a906b392d3c67/diff:/var/lib/docker/overlay2/51fa93d15d9e0ed823aedb4ee6b10fb263b67370da180d78b3c21f762ceac107/diff:/var/lib/docker/overlay2/f90005613ec1346b793de602f7c8268216c3786d1c0d4632fe23a1ebde86cfba/diff:/var/lib/docker/overlay2/284b59553aeb75507940eac2d4d1cc6dbb9330dfe10ef4420462063721f97021/diff:/var/lib/docker/overlay2/a87ed91e55a01f38e42691e6df88e2f172664d705c872eccbbf7c4d04bf5a353/diff:/var/lib/docker/overlay2/8dce0ebce6069b35acbb0a965d9db99d2d2c9e27ea0aeba5236588f508ec6aef/diff:/var/lib/docker/overlay2/f43b108f79fe855f15bc9d7c66735ce2f17aaa56f9ba79693b43dd3ec77907e2/diff:/var/lib/docker/overlay2/e94104e2973705f1fb84f3267ce24a958a120677dcd6c3aa8349a5127175e75b/diff:/var/lib/docker/overlay2/f3d0a22083bf704c3099aa72a98de2cb8a34f1f55fc3eb99e3b39e330b0f3af5/diff",
"MergedDir": "/var/lib/docker/overlay2/d81161a252d96e94ec50a23638f46074d552c5b42a4a5aca1b2667387da0166f/merged",
"UpperDir": "/var/lib/docker/overlay2/d81161a252d96e94ec50a23638f46074d552c5b42a4a5aca1b2667387da0166f/diff",
"WorkDir": "/var/lib/docker/overlay2/d81161a252d96e94ec50a23638f46074d552c5b42a4a5aca1b2667387da0166f/work"
},
"Name": "overlay2"
},
"Mounts": [
{
"Type": "bind",
"Source": "/opt/data",
"Destination": "/opt/dmdbms/data",
"Mode": "",
"RW": true,
"Propagation": "rprivate"
}
],
"Config": {
"Hostname": "5961fb86f531",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"ExposedPorts": {
"52141/tcp": {},
"5236/tcp": {},
"61141/tcp": {}
},
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"LD_LIBRARY_PATH=/opt/dmdbms/bin",
"PAGE_SIZE=16",
"EXTENT_SIZE=32",
"LOG_SIZE=1024",
"UNICODE_FLAG=1",
"LENGTH_IN_CHAR=1",
"INSTANCE_NAME=dm8_test",
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"CHG_PASSWD=dameng777",
"SYSDBA_PWD=SYSDBA001",
"CASE_SENSITIVE=1",
"BUFFER=1000",
"DMWATCHER_ROLE=primary",
"OGUID=453331",
"DW_NODES=2",
"MODE=dmsingle",
"DW_NO=1",
"K8S_NAMESPACE=dameng",
"DM_USER_PWD=dameng777",
"BLANK_PAD_MODE=0"
],
"Cmd": null,
"Image": "dm8:dm8_20241119_rev149328_x86_rh6_64",
"Volumes": null,
"WorkingDir": "",
"Entrypoint": [
"/opt/startup.sh"
],
"OnBuild": null,
"Labels": {}
},
"NetworkSettings": {
"Bridge": "",
"SandboxID": "b8a615abb062c6562d966bd858a47006914675204b1a10e97361ddea1e766655",
"SandboxKey": "/var/run/docker/netns/b8a615abb062",
"Ports": {
"52141/tcp": null,
"5236/tcp": [
{
"HostIp": "0.0.0.0",
"HostPort": "30236"
},
{
"HostIp": "::",
"HostPort": "30236"
}
],
"61141/tcp": null
},
"HairpinMode": false,
"LinkLocalIPv6Address": "",
"LinkLocalIPv6PrefixLen": 0,
"SecondaryIPAddresses": null,
"SecondaryIPv6Addresses": null,
"EndpointID": "ddd9a5b72f8e45b7fae3c6d74dad933e151fd2d9d9c598ae82729511d060efb3",
"Gateway": "172.17.0.1",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"IPAddress": "172.17.0.2",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"MacAddress": "02:42:ac:11:00:02",
"Networks": {
"bridge": {
"IPAMConfig": null,
"Links": null,
"Aliases": null,
"MacAddress": "02:42:ac:11:00:02",
"DriverOpts": null,
"NetworkID": "e9baa358b31155b5d4b5265f53f57db360016a79f9c78399e9d69d37a6512738",
"EndpointID": "ddd9a5b72f8e45b7fae3c6d74dad933e151fd2d9d9c598ae82729511d060efb3",
"Gateway": "172.17.0.1",
"IPAddress": "172.17.0.2",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"DNSNames": null
}
}
}
}
]
3.6查看镜像启动情况
容器创建完成后,使用docker ps查看镜像的启动情况,结果显示如下:
[root@localhost opt]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
5961fb86f531 dm8:dm8_20241119_rev149328_x86_rh6_64 "/opt/startup.sh" 11 minutes ago Up 11 minutes 52141/tcp, 61141/tcp, 0.0.0.0:30236->5236/tcp, [::]:30236->5236/tcp dm8_test
[root@localhost opt]#
3.7可通过日志检查启动情况
docker logs -f dm8_test
或
docker logs -f a1d3053287b2
测试结果:这个版本不支持length_in_char
[root@localhost opt]# docker logs -f dm8_test
Script start.
length_in_char is no longer supported in this version, and this setting will not take effect.
* Starting periodic command scheduler cron
...done.
file dm.key not found, use default license!
License will expire on 2024-12-09
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
write to dir [/opt/dmdbms/data/DAMENG].
create dm database success. 2024-11-25 10:49:53
initdb V8
db version: 0x7000c
Init DM success!
Start DmAPService...
Starting DmAPService: [ OK ]
/opt/dmdbms/conf/dm.ini does not exist, use default dm.ini
Start DMSERVER success!
Dmserver is running.
DM Database is not OK, please wait...
DM Database is OK
Start DMSERVER success!
Dmserver is running.
DM Database is OK
Finished soft link DM current dm_DM8_TEST_202411.log to dm_DMSERVER.log
2024-11-25 10:50:13.780 [INFO] database P0000000095 T0000000000000000095 nsvr_process_before_open success.
2024-11-25 10:50:13.785 [INFO] database P0000000095 T0000000000000000095 backup control file /opt/dmdbms/data/DAMENG/dm.ctl to file /opt/dmdbms/data/DAMENG/dm_20241125105013_785460.ctl
2024-11-25 10:50:13.785 [INFO] database P0000000095 T0000000000000000188 nsvr_lsnr_thread successfully created.
2024-11-25 10:50:13.785 [INFO] database P0000000095 T0000000000000000146 total 0 active crash trx, pseg_crash_trx_rollbacksys_only(0) begin ...
2024-11-25 10:50:13.786 [INFO] database P0000000095 T0000000000000000146 pseg_crash_trx_rollback end, total 0 active crash trx, include 0 empty_trxs, 0 empty_pages which only need to delete mgr recs.
2024-11-25 10:50:13.786 [INFO] database P0000000095 T0000000000000000146 pseg_crash_trx_rollback end
2024-11-25 10:50:13.793 [INFO] database P0000000095 T0000000000000000095 backup control file /opt/dmdbms/data/DAMENG/dm.ctl to file /opt/dmdbms/data/DAMENG/ctl_bak/dm_20241125105013_792631.ctl succeed
2024-11-25 10:50:13.793 [INFO] database P0000000095 T0000000000000000095 local instance name is DM8_TEST, mode is NORMAL, status is OPEN.
2024-11-25 10:50:13.793 [INFO] database P0000000095 T0000000000000000095 SYSTEM IS READY.
2024-11-25 10:50:13.793 [INFO] database P0000000095 T0000000000000000095 set g_dw_stat from UNDEFINED to NONE success, g_dw_recover_stop is 0
2024-11-25 10:53:09.284 [INFO] database P0000000095 T0000000000000000187 checkpoint requested, rlog free space[2140603904], used space[6871552]
2024-11-25 10:53:09.295 [INFO] database P0000000095 T0000000000000000187 checkpoint generate by ckpt_interval
2024-11-25 10:53:09.299 [INFO] database P0000000095 T0000000000000000140 checkpoint begin, used_space[6871552], free_space[2140603904]...
2024-11-25 10:53:09.300 [INFO] database P0000000095 T0000000000000000140 ckpt2_log_adjust: full_status: 160, ptx_reserved: 0
2024-11-25 10:53:09.301 [INFO] database P0000000095 T0000000000000000140 ckpt2_log_adjust: ckpt_lsn(25498), ckpt_fil(0), ckpt_off(6874624), cur_lsn(25499), l_next_seq(4200), g_next_seq(4200), cur_free(6875648), total_space(2147475456), free_space(2147474432), n_ep(1)
2024-11-25 10:53:09.301 [INFO] database P0000000095 T0000000000000000140 checkpoint end, 0 pages flushed, used_space[1024], free_space[2147474432].
2024-11-25 10:56:09.083 [INFO] database P0000000095 T0000000000000000187 checkpoint requested by CKPT_INTERVAL, rlog free space[2147474432], used space[1024]
2024-11-25 10:56:09.083 [INFO] database P0000000095 T0000000000000000187 checkpoint generate by ckpt_interval
2024-11-25 10:56:09.083 [INFO] database P0000000095 T0000000000000000140 checkpoint begin, used_space[1024], free_space[2147474432]...
2024-11-25 10:56:09.090 [INFO] database P0000000095 T0000000000000000140 ckpt2_log_adjust: full_status: 160, ptx_reserved: 0
2024-11-25 10:56:09.090 [INFO] database P0000000095 T0000000000000000140 ckpt2_log_adjust: ckpt_lsn(25499), ckpt_fil(0), ckpt_off(6875648), cur_lsn(25499), l_next_seq(4200), g_next_seq(4200), cur_free(6875648), total_space(2147475456), free_space(2147475456), n_ep(1)
2024-11-25 10:56:09.090 [INFO] database P0000000095 T0000000000000000140 checkpoint end, 0 pages flushed, used_space[0], free_space[2147475456].
2024-11-25 10:59:09.679 [INFO] database P0000000095 T0000000000000000187 checkpoint requested by CKPT_INTERVAL, rlog free space[2147475456], used space[0]
2024-11-25 10:59:09.679 [INFO] database P0000000095 T0000000000000000187 checkpoint generate by ckpt_interval
2024-11-25 10:59:09.679 [INFO] database P0000000095 T0000000000000000140 checkpoint begin, used_space[0], free_space[2147475456]...
2024-11-25 10:59:09.679 [INFO] database P0000000095 T0000000000000000140 ckpt2_log_adjust: full_status: 160, ptx_reserved: 0
2024-11-25 10:59:09.679 [INFO] database P0000000095 T0000000000000000140 ckpt2_log_adjust: ckpt_lsn(25499), ckpt_fil(0), ckpt_off(6875648), cur_lsn(25499), l_next_seq(4200), g_next_seq(4200), cur_free(6875648), total_space(2147475456), free_space(2147475456), n_ep(1)
2024-11-25 10:59:09.679 [INFO] database P0000000095 T0000000000000000140 checkpoint end, 0 pages flushed, used_space[0], free_space[2147475456].
2024-11-25 11:02:09.014 [INFO] database P0000000095 T0000000000000000187 checkpoint requested by CKPT_INTERVAL, rlog free space[2147475456], used space[0]
2024-11-25 11:02:09.015 [INFO] database P0000000095 T0000000000000000187 checkpoint generate by ckpt_interval
2024-11-25 11:02:09.015 [INFO] database P0000000095 T0000000000000000140 checkpoint begin, used_space[0], free_space[2147475456]...
2024-11-25 11:02:09.036 [INFO] database P0000000095 T0000000000000000140 ckpt2_log_adjust: full_status: 160, ptx_reserved: 0
2024-11-25 11:02:09.036 [INFO] database P0000000095 T0000000000000000140 ckpt2_log_adjust: ckpt_lsn(25499), ckpt_fil(0), ckpt_off(6875648), cur_lsn(25499), l_next_seq(4200), g_next_seq(4200), cur_free(6875648), total_space(2147475456), free_space(2147475456), n_ep(1)
2024-11-25 11:02:09.036 [INFO] database P0000000095 T0000000000000000140 checkpoint end, 0 pages flushed, used_space[0], free_space[2147475456].
3.8 删除容器
docker remove -f 56d76d12f322
3.9 查看持久化目录
ls -al /opt/data/DAMENG/
[root@localhost docker]# ls -al /opt/data/DAMENG/
total 2488412
drwxr-xr-x. 6 cathy cathy 4096 Nov 25 10:50 .
drwxr-xr-x. 3 cathy cathy 20 Nov 25 10:49 ..
drwxr-xr-x. 2 cathy cathy 6 Nov 25 10:49 bak
drwxr-xr-x. 2 cathy cathy 78 Nov 25 10:50 ctl_bak
-rw-r--r--. 1 cathy cathy 1073741824 Nov 25 11:20 DAMENG01.log
-rw-r--r--. 1 cathy cathy 1073741824 Nov 25 10:50 DAMENG02.log
-rw-r--r--. 1 cathy cathy 5120 Nov 25 10:50 dm.ctl
-rw-r--r--. 1 cathy cathy 53809 Nov 25 10:49 dm.ini
-rw-r--r--. 1 cathy cathy 973 Nov 25 10:49 dminit20241125104950.log
-rw-r--r--. 1 cathy cathy 633 Nov 25 10:49 dm_service.prikey
drwxr-xr-x. 2 cathy cathy 6 Nov 25 10:49 HMAIN
-rw-r--r--. 1 cathy cathy 134217728 Nov 25 10:49 MAIN.DBF
-rw-r--r--. 1 cathy cathy 12 Nov 25 10:50 rep_conflict.log
-rw-r--r--. 1 cathy cathy 134217728 Nov 25 10:50 ROLL.DBF
-rw-r--r--. 1 cathy cathy 481 Nov 25 10:49 sqllog.ini
-rw-r--r--. 1 cathy cathy 88080384 Nov 25 10:53 SYSTEM.DBF
-rw-r--r--. 1 cathy cathy 44040192 Nov 25 10:50 TEMP.DBF
drwxr-xr-x. 2 cathy cathy 6 Nov 25 10:50 trace
[root@localhost docker]#
4 DM8启/停数据库
停止数据库命令如下:
docker stop dm8_test
启动数据库命令如下:
docker start dm8_test
重启命令如下:
docker restart dm8_test
5进入 DM8 容器连接数据库
通过以下命令进入容器:
docker exec -it dm8_test bash
连接数据库:
./disql SYSDBA/SYSDBA001
[root@localhost docker]# docker exec -it dm8_test bash
root@5961fb86f531:/# cd /opt/dmdbms/bin
root@5961fb86f531:/opt/dmdbms/bin# ./disql SYSDBA/SYSDBA001
Server[LOCALHOST:5236]:mode is normal, state is open
login used time : 42.613(ms)
disql V8
SQL>
注意:
1.如果使用 docker 容器里面的 disql,进入容器后,先执行 source /etc/profile 防止中文乱码。
2.新版本 Docker 镜像中数据库默认用户名/密码为 SYSDBA/SYSDBA001。
原文地址:https://blog.csdn.net/weixin_45699851/article/details/143964985
免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!