Preparation before installation
software and hardware | Version |
---|---|
terminal | X86-64 architecture |
Docker | June 2023 edition |
Download the Docker installation package
Please download the Docker installation package from the Dameng Database official website .
Import installation package
Copy the installation package to the /opt directory and execute the following command to import the installation package:
docker load -i dm8_20230808_rev197096_x86_rh6_64_single.tar
The results are shown below:
After the import is complete, you can use docker images
to view the imported image. The results are shown below:
Start container
After the image is imported, use to docker run
start the container. The startup command is as follows:
docker run -d -p 30236:5236 --restart=always --name dm8_test --privileged=true -e PAGE_SIZE=16 -e LD_LIBRARY_PATH=/opt/dmdbms/bin -e EXTENT_SIZE=32 -e BLANK_PAD_MODE=1 -e LOG_SIZE=1024 -e UNICODE_FLAG=1 -e LENGTH_IN_CHAR=1 -e INSTANCE_NAME=dm8_test -v /data/dm8_test:/opt/dmdbms/data dm8_single:dm8_20230808_rev197096_x86_rh6_64
The results are shown below:
After the container is started, use docker ps
to view the startup status of the image. The results are as follows:
After the startup is completed, you can check the startup status through the log. The command is as follows:
docker logs -f dm8_test
或
docker logs -f 58deb28d1209
The results are shown below:
Start/stop database
The command to stop the database is as follows:
docker stop dm8_test
The command to start the database is as follows:
docker start dm8_test
The restart command is as follows:
docker restart dm8_test
Notice
1. If you use disql in a docker container, after entering the container, first execute source /etc/profile to prevent Chinese garbled characters.
2. The default username/password for the database in the new version of Docker image isSYSDBA / SYSDBA001
.
links:
https://eco.dameng.com/document/dm/zh-cn/start/dm-install-docker.html