ibmcom/db2express-c_docker官方使用文档

(DEPRECIATED) Please check DB2 Developer-C Edition for the replacement.

What is IBM DB2 Express-C ?

``IBM DB2 Express-C``` is the no-charge community edition of DB2 server, a simple, flexible, powerful, and reliable relational database server. It is easy to install, embed, deploy, and available for download, deployment, and redistribution at no charge

  • Uses Time Travel Query to provide bi-temporal data management.
  • Delivers an integrated tools environment with IBM Data Studio for easier management and development.
  • Includes Graph Store technology to efficiently store graph triples for reduced costs and enhanced performance.
  • Contains the SQL Compatibility feature making it easier to run applications written for other major databases, on DB2.

IBM DB2 Express-C is available for download and deployment at no charge. Optional yearly subscription is available for users who require technical support or additional functionality, such as High Availability, Row and Column Access Control and SQL Replication.

DB2 for Linux, UNIX and Windows

DB2 Express-C

[Resource Center](http://www-01.ibm.com/software/data/db2/linux-unix-windows/library.html#Information centers)

Supported tags

  • latest (```10.5.0.5-3.10.0``)
  • 10.5.0.5-3.10.0,

The supported tags stands for <db2 version> - <Linux kernel version of Docker Engine>. DB2 Docker images can be deployed on a Docker Engine with any flavour of Linux , as long as it has the compatible Linux ``kernel-3.10.0, likeCentOS 7``` respectively.

  • Please make sure your Docker Engine has a compatible Linux kernel
  • Please use Docker 1.6.0 or later release on Ubuntu Docker Engine or Boot2Docker since there is a known issue with [aufs and direct io] (https://github.com/docker/docker/pull/10534)

Set up Docker environment on your laptop

  • Download Docker Toolbox for Mac or Docker Toolbox for Windows(patched,v1.8.1d), and install on your laptop

  • Instructions for Windows Instructions for Mac

How to use this image ?

This docker image has to be deployed to Docker Engine on one of supported Cloud providers or your own system. The instructions for creating Docker Engine vary by Cloud provider. We recommend to use [Docker Machine (beta)] (https://docs.docker.com/machine/) to provision Docker Engine.

In order to use the image, it is necessary to accept the terms of the DB2 Express-C license. This is achieved by specifying the environment variable LICENSE equal to accept when running the image.

This docker image contained pre-deployed DB2 Express-C with the default DB2 instance, db2inst1.

1 - Start a container

docker run -it -p 50000:50000 -e DB2INST1_PASSWORD=db2inst1-pwd -e LICENSE=accept ibmcom/db2express-c:latest bash

  • -p 50000:50000 exposes port 50000 to allow connections from the remote client.
  • By specifying -e DB2INST1_PASSWORD=db2inst1-pwd parameter, you set a password of your choice for the db2inst1 user for the default DB2 instance.
  • By specifying -e LICENSE=accept parameter, you are accepting this License to use the software contained in this image.

2 - Start DB2 and create sample DB Please switch to the default db2 instance user db2inst1 to start DB2 instance and create a sample database if you want :

$ su - db2inst1
$ db2start
$ db2sampl
  • The time of creating a sample database depends on your system performance, which may take several minutes.
  • You can create another database using db2 create db <dbname> command.

3 - Note

  1. Start as a daemon You can start a container as a daemon with DB2 services up/running :

docker run -d -p 50000:50000 -e DB2INST1_PASSWORD=db2inst1-pwd -e LICENSE=accept ibmcom/db2express-c:latest db2start

  • db2start, db2 services start automatically and remote client can connect to it at port 50000
2) Mount a volume While starting a Docker container, you can mount a volume from a directory on the Docker host like the following command :

docker run -it -p 50000:50000 -e DB2INST1_PASSWORD=db2inst1-pwd -e LICENSE=accept -v $(pwd):/share ibmcom/db2express-c:latest bash

  • /share, referring to mount point at "/share" in the Docker.
  • $(pwd), the current directory on Docker host while running Docker command, which is mounted by Docker container. It can also be any existing directory on Docker host, like /tmp, /opt, etc.
  • If you want to use the mounted volume for DB2 system or data storage, please update DB2 manager configuration according to IBM Knowledge Center
3) DB2 is deployed in the Docker Engine in:

/opt/ibm/db2/V10.5

License

The Dockerfile and associated scripts are licensed under the Apache License 2.0. DB2 Express-C is licensed under the IBM International License Agreement for Non-Warranted Programs. This license for DB2 Express-C can be found online. Note that this license does not permit further distribution.

Supported Docker versions

  • This image is officially supported on Docker version 1.6.0.
  • Support for older versions (down to 1.0) is provided on a best-effort basis.

Community Support

Like this image? Give us a star at the top of this page!

转载于:https://my.oschina.net/songguangqi/blog/3040151

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值