DM8 Docker环境部署

news2025/1/12 16:08:07

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。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/2249833.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

DevOps工程技术价值流:Jenkins驱动的持续集成与交付实践

一、Jenkins系统概述 Jenkins:开源CI/CD引擎的佼佼者 Jenkins,作为一款基于Java的开源持续集成(CI)与持续交付(CD)系统,凭借其强大的插件生态系统,成为DevOps实践中不可或缺的核心…

apache实现绑定多个虚拟主机访问服务

1个网卡绑定多个ip的命令 ip address add 192.168.45.140/24 dev ens33 ip address add 192.168.45.141/24 dev ens33 在linux服务器上,添加多个站点资料,递归创建三个文件目录 分别在三个文件夹下,建立测试页面 修改apache的配置文件http.…

【css实现收货地址下边的平行四边形彩色线条】

废话不多说&#xff0c;直接上代码&#xff1a; <div class"address-block" ><!-- 其他内容... --><div class"checked-ar"></div> </div> .address-block{height:120px;position: relative;overflow: hidden;width: 500p…

启动SpringBoot

前言&#xff1a;大家好我是小帅&#xff0c;今天我们来学习SpringBoot 文章目录 1. 环境准备2. Maven2.1 什么是Maven2.2 创建⼀个Maven项⽬2.3 依赖管理2.3.1 依赖配置2.3.2 依赖传递2.3.4 依赖排除2.3.5 Maven Help插件&#xff08;plugin&#xff09; 2.4 Maven 仓库2.6 中…

ERROR CoarseGrainedExecutorBackend: RECEIVED SIGNAL TERM

如果你的spark on yarn任务正常运行&#xff0c;能得到结果&#xff0c;但是日志中出现了如下的报错 看见这个报错不要慌张&#xff0c;这个是你开启了动态伸缩容器&#xff0c;且当这个容器触发了空闲关闭的阈值&#xff0c;默认是60秒&#xff0c;这时候该容器会被删除掉&a…

SpringBoot实战(三十二)集成 ofdrw,实现 PDF 和 OFD 的转换、SM2 签署OFD

目录 一、OFD 简介1.1 什么是 OFD&#xff1f;1.2 什么是 版式文档&#xff1f;1.3 为什么要用 OFD 而不是PDF&#xff1f; 二、ofdrw 简介2.1 定义2.2 Maven 依赖2.3 ofdrw 的 13 个模块 三、PDF/文本/图片 转 OFD&#xff08;ofdrw-conterver&#xff09;3.1 介绍&#xff1a…

QT6学习第四天 感受QT的文件编译

QT6学习第四天 感受QT的文件编译 使用纯代码编写程序新建工程 使用其他编辑器纯代码编写程序并在命令行运行使用 .ui 表单文件生成界面使用自定义 C 窗口类使用现成的QT Designer界面类 使用纯代码编写程序 我们知道QT Creator中可以用拖拽的方式在 .ui 文件上布局&#xff0c…

C++:用红黑树封装map与set-2

文章目录 前言一、红黑树封装map与set中const迭代器1. 框架的搭建2. set实现const迭代器3. map实现const迭代器 二、operator[ ]1. operator[ ]要达成的样子2. insert的改变 三. 解决insert里set中的问题四. 解决map中的operator[ ]总结用红黑树封装map与set代码 前言 前面我们…

微信小程序下拉刷新与上拉触底的全面教程

微信小程序下拉刷新与上拉触底的全面教程 引言 在微信小程序的开发中,用户体验至关重要。下拉刷新和上拉触底是提高用户交互体验的重要功能,能够让用户轻松获取最新数据和内容。本文将详细介绍这两个功能的实现方式,结合实际案例、代码示例和图片展示,帮助开发者轻松掌握…

【博主推荐】C#中winfrom开发常用技术点收集

文章目录 前言1.打开文件夹并选中文件2.窗体之间传参3.异步调用&#xff1a;让数据处理不影响页面操作4.创建一个多文档界面(MDI) 应用程序5.在WinForms中使用数据绑定6.在WinForms中后台使用控件的事件处理7.在WinForms中窗体跳转的几种方式8.后台处理方法中&#xff0c;调用窗…

第四十二篇 EfficientNet:重新思考卷积神经网络的模型缩放

文章目录 摘要1、简介2、相关工作3、复合模型缩放3.1、 问题公式化3.2、扩展维度3.3、复合比例 4、EfficientNet架构5、实验5.1、扩展MobileNets和ResNets5.2、EfficientNet的ImageNet结果5.3、EfficientNet的迁移学习结果 6、讨论7、结论 摘要 卷积神经网络(ConvNets)通常在固…

【Android】MMKV—高性能轻量化存储组件

【Android】MMKV—高性能轻量化存储组件 本文参考以及学习文档&#xff1a; Android存储&#xff1a;轻松掌握MMKV通过学习本文&#xff0c;轻松掌握腾讯开发的 MMKV 组件&#xff0c;尽早在项目中替换掉SharedPr - 掘金 MMKV——Android上的使用(替换SP存储)MMKV 是基于 mmap …

python+django自动化平台(一键执行sql) 前端vue-element展示

一、开发环境搭建和配置 pip install mysql-connector-pythonpip install PyMySQL二、django模块目录 dbOperations ├── __init__.py ├── __pycache__ │ ├── __init__.cpython-313.pyc │ ├── admin.cpython-313.pyc │ ├── apps.cpython-313.pyc │ …

arm Rk1126 编译Qt工程报错: Could not find qmake spec

首先修改qmake.conf文件&#xff0c;配置好正确的交叉编译工具&#xff1a; 然后执行编译&#xff1a; /opt/Rv1126/Rv1126-盒子代码/rv1126-qt5-sdk/bin/qmake untitled.pro 报错。 原因&#xff1a;中文路径。修改路径为英文路径即可

[保姆式教程]使用labelimg2软件标注定向目标检测数据和格式转换

定向目标检测是一种在图像或视频中识别和定位对象的同时&#xff0c;还估计它们方向的技术。这种技术特别适用于处理有一定旋转或方向变化的对象&#xff0c;例如汽车、飞机或文本。定向目标检测器的输出是一组旋转的边界框&#xff0c;这些框精确地包围了图像中的对象&#xf…

C语言刷题笔记3(7)

7.1 数组处理斐波那契数列 题目描述:用数组来处理Fibonacci数列并输出。 输入:一个不超过40且大于2的整数n&#xff0c;表示需要处理并输出的Fibonacci数个数。 输出:输出前n个Fibonacci数&#xff0c;每行输出5个值&#xff0c;按每12位向右对齐的方式输出。请注意不要在第…

PHP 去掉特殊不可见字符 “\u200e“

描述 最近在排查网站业务时&#xff0c;发现有数据匹配失败的情况 肉眼上完全看不出问题所在 当把字符串 【M24308/23-14F‎】复制出来发现 末尾有个不可见的字符 使用删除键或左右移动时才会发现 最后测试通过 var_dump 打印 发现这个"空字符"占了三个长度 &#xf…

构建 LLM (大型语言模型)应用程序——从入门到精通(第七部分:开源 RAG)

通过检索增强生成 (RAG) 应用程序的视角学习大型语言模型 (LLM)。 本系列博文 简介数据准备句子转换器矢量数据库搜索与检索大语言模型开源 RAG&#xff08;本帖&#xff09;评估服务LLM高级 RAG 1. 简介 我们之前的博客文章广泛探讨了大型语言模型 (LLM)&#xff0c;涵盖了其…

linux基础2

声明&#xff01; 学习视频来自B站up主 泷羽sec 有兴趣的师傅可以关注一下&#xff0c;如涉及侵权马上删除文章&#xff0c;笔记只是方便各位师傅的学习和探讨&#xff0c;文章所提到的网站以及内容&#xff0c;只做学习交流&#xff0c;其他均与本人以及泷羽sec团队无关&#…

智能产品综合开发 - 手势识别

1 实训选题目的 本次实训选择的题目是“基于树莓派的手势识别系统”&#xff0c;旨在为人们提供一种便捷的交互方式&#xff0c;使用户能够通过手势控制智能设备&#xff0c;摆脱传统的物理按键操作。通过本项目&#xff0c;我们希望能实现快速、灵活的手势识别&#xff0c;提升…