代码拉取完成,页面将自动刷新
人大金仓数据库docker镜像构建。数据库版本:KingbaseES_V008R006C006B0021_Lin64_install.iso
。
Server
文件的压缩打包而来。命令:tar -czvf kingbase.tar.gz Server/
。--pwfile=${PWD_FILE}
读取密码。${PWD_FILE}
即docker-entrypoint.sh
脚本中password文件的路径。$ tree kingbase-es-v8-r6-docker -L 1
kingbase-es-v8-r6-docker
├── docker-entrypoint.sh
├── Dockerfile
├── kingbase.tar.gz
├── license.dat
├── password
1 directory, 5 files
SYSTEM_USER
超级管理员用户名,默认值system
。SYSTEM_PWD
超级管理员密码,默认值123456
。ENCODING
选择模板数据库的编码,默认值UTF8
。可选值:UTF8
, GBK
, GB18030
。
这也将是后来创建的任何数据库的默认编码,除非你覆盖它。DATABASE_MODE
数据库兼容模式,默认值ORACLE
。设置 KingbaseES V8.6 初始化时的兼容模式。
默认情况下 (初始化时不设置此参数) 为兼容 Oracle 模式。
支持四种参数值: pg
, oracle
, 0
, 1
;其中 pg 和 0 表示兼容 PostgreSQL 模式, oracle 和 1 表示兼容
Oracle 模式。注意:参数值 pg 和 oracle 不区分大小写。CASE_SENSITIVE
大小写是否敏感,默认敏感。特别提醒:不区分大小写只能在oracle模式下启用
。敏感,取值:YES
或 1
;不敏感,取值:NO
或 0
。BLOCK_SIZE
默认的尺寸为 8
千字节。该值必须是 2
的整数次幂,并且在 1
到 32
之
间。这个选项只能在初始化期间设置,并且之后不能更改。tar -czvf kingbase.tar.gz Server/
。
百度网盘可供下载:https://pan.baidu.com/s/1MGHdg_bGhhvrJk4MyLv_4Q?pwd=r22e
提取码:r22ecd kingbase-es-v8-r6-docker
,进入目录,把 kingbase.tar.gz 文件复制到该目录下。docker build -t kingbase:v8r6 .
运行该命令构建镜像。docker run --name kingbase -d -p 54321:54321 \
-e SYSTEM_USER=system \
-e SYSTEM_PWD=123456 \
-e ENCODING=UTF8 \
-e DATABASE_MODE=ORACLE \
-e CASE_SENSITIVE=NO \
-e BLOCK_SIZE=8 \
-v /home/kingbase/data:/home/kingbase/data \
-v /home/kingbase/license.dat:/home/kingbase/Server/bin/license.dat \
kingbase:v8r6
--name
: 容器名称。-d
: 容器后台运行。-p
: 端口映射。例如:宿主机端口:容器端口
。-e
: 环境变量。根据实际情况自行修改。-v
:挂载宿主机数据(目录|文件)。例如:宿主机(目录|文件):容器内(目录|文件)
。If the data directory is not specified, the environment variable KINGBASE_DATA
is used.
Report bugs to <kingbase-bugs@kingbase.com.cn>.
The files belonging to this database system will be owned by user "kingbase".
This user must also own the server process.
The database cluster will be initialized with locale "C".
The default text search configuration will be set to "english".
The comparision of strings is case-insensitive.
Data page checksums are disabled.
fixing permissions on existing directory /home/kingbase/data ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default time zone ... UTC
creating configuration files ... ok
Begin setup encrypt device
initializing the encrypt device ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
create security database ... ok
load security database ... ok
syncing data to disk ... ok
Success. You can now start the database server using:
./sys_ctl -D /home/kingbase/data -l logfile start
initdb: warning: enabling "trust" authentication for local connections
You can change this by editing sys_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.
waiting for server to start.... done
server started
2022-10-02 05:11:15.881 GMT [31] HINT: the value of max_connect is set 10
2022-10-02 05:11:15.882 GMT [31] WARNING: max_connections should be less than or equal than 10 (restricted by license)
2022-10-02 05:11:15.882 GMT [31] HINT: the value of max_connect is set 10
2022-10-02 05:11:15.895 UTC [31] LOG: sepapower extension initialized
2022-10-02 05:11:15.907 UTC [31] LOG: starting KingbaseES V008R006C006B0021 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-46), 64-bit
2022-10-02 05:11:15.907 UTC [31] LOG: listening on IPv4 address "0.0.0.0", port 54321
2022-10-02 05:11:15.907 UTC [31] LOG: listening on IPv6 address "::", port 54321
2022-10-02 05:11:15.909 UTC [31] LOG: listening on Unix socket "/tmp/.s.KINGBASE.54321"
2022-10-02 05:11:15.948 UTC [31] LOG: redirecting log output to logging collector process
2022-10-02 05:11:15.948 UTC [31] HINT: Future log output will appear in directory "sys_log".
不区分大小写只能在oracle模式下启用。在oracle模式下,CASE_SENSITIVE才能设置为 NO 或 0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。