https://blog.keithkim.com/2020/02/note-install-db2-express-c-on-ubuntu-18.html
With Ubuntu + Docker -- things are a lot easier. See below:
Steps
[1] Get DB2 docker image
$ docker pull ibmcom/db2
[2] Create database volume directory
$ mkdir -p /data/db/db2
[3] Run DB2
$ docker run -itd --name db2 --privileged=true -p 50000:50000 -e LICENSE=accept -e DB2INST1_PASSWORD=<choose an instance password> -e DBNAME=testdb -v /data/db/db2:/database ibmcom/db2
[4] Monitor
$ docker logs -f db2
Wait until DB2 is running and database is created.
Misc
Connect to DB2 container:$ docker exec -ti db2 bash -c "su - db2inst1"
REFERENCE
- https://hub.docker.com/r/ibmcom/db2
- Use Oracle SQL Developer to access DB2 - https://www.db2tutorial.com/getting-started/sql-developer-db2/
No comments:
Post a Comment