Aug 11, 2017 12:14:00 PM by Ondrej Zizka
In this post, I would like to show you how to install IBM Db2 Developer Community edition. IBM Db2 Developer Community Edition is a full-featured free version for non-production environments. Primarily it is dedicated to developers and has some limitations:
It is available for Mac, Windows, and Linux as a Docker or Non-Docker installation. It can be used both for standalone and clustered installations.
We will also install Data Server Manager, which is a successor to the IBM Data Studio Web Console.
This demo requires a basic knowledge of Docker (or generally containers – no commands needed, just principles) and the ability to install Centos 7 operating system.
For more information, go to the following link, where you can also download installation packages:
Log in with your IBM ID, accept the license and check the I agree checkbox.
Download the edition for Linux x86.
When you finish the download, it is necessary to prepare the virtual machine for the Db2 installation. As you know, the resources for this version of IBM Db2 are limited; but generally, the more resources you allocate to the database the better performance it has, so allocate to the virtual machine as much of each of the resources as possible. Here is my configuration:
I use VMware Workstation, but any other tool (such as VirtualBox) would be sufficient.
Prepare Centos 7 installation with the latest updates and no other supplements on this virtual machine with at least 1 admin non-root user.
Log in to a virtual machine as a non-root user (in my case, it is devuser).
Upload the AppImage file that you downloaded from the IBM pages and open the terminal.
Update the package database:
sudo yum check-update
Install Docker repository. Download the latest version of Docker and install it. This may take several minutes.
curl -fsSL https://get.docker.com/ | sh
Add a user to the docker group to be able to execute the Docker commands.
sudo usermod -aG docker devuser
Be sure to use your user in the command above!
Verify Docker status to see if it runs:
sudo systemctl status docker
Enable Docker to start automatically during the booting of the system.
sudo systemctl enable docker
If you issue the command…
…You will receive a “permission denied” error. This is because the group membership was not reloaded. So, if you issue the command…
…You will see that the docker group is not listed. There is a workaround for this. Just open a new shell with a command
su - $USER
The system will ask for the password. When you issue the id command again, you will see the docker group in the list.
When you run the command docker info again, you should see something like this at the end of the output.
Check if you have opened the ports 11080-11082 and 50000.
sudo firewall-cmd --list-ports
To open these ports run the following commands:
sudo firewall-cmd --zone=public –-permanent --add-port=50000/tcp
sudo firewall-cmd --zone=public --permanent --add-port=11080-11082/tcp
Port 50000 is for Db2; ports 11080-11082 are for Data Server Manager.
The following two commands list open ports and reload the configuration of the firewall.
sudo firewall-cmd --permanent --list-ports
sudo firewall-cmd --reload
Move to the location where the AppImage is stored. Be sure that the file has an executable privilege. If not, use chmod command to change it.
chmod u+x ./ibm-db2-developer_community_edition-1.1.0-x86_64.AppImage
Execute the AppImage.
Click on Yes or No. I want to integrate so I use Yes.
Agree to the license terms and click Continue.
If you want to also install the Data Studio, tick the checkbox. I will leave it unchecked and click Continue.
Type the credentials that will be used for the Data Server Manager and Database Server. The value db2inst1 is prepopulated and fixed.
You can choose from two versions of Sample database. The first is for OLTP (transactional) and the second for an OLAP (analytical) workload. I will use transactional.
The installation process starts. It may take some time, depending on your network connection.
When it finishes, you will see...
Click on close to close the window.
Check whether IBM Db2 is listening on port 50000.
Issue the command netstat –tan and check the output. If you see port 50000 occupied, the installation and start of the database were successful.
Now go to Application | Other | IBM Db2 Developer Community Edition
Click on Open terminal and type
Find the Container ID of the db2server
Then execute the following command to open the terminal in the container as db2inst1 user in the Db2 container.
In my case the container ID is a62c1583a75, so the command will be:
docker exec -it a62c1583a756 bash -c 'su - db2inst1'
db2 connect to sample
…to see if you are able to connect to the SAMPLE database created during the installation process.
Perfect! You have successfully installed IBM Db2 Developer Community Edition.
Are you in a trial now or just learning about Toad for IBM DB2? Find out which edition is right for you with our Toad for IBM DB2 functional matrix.
Like what you’ve learned so far about Toad for IBM DB2, why not try it for free for 30 days?
Learn more about Toad for IBM DB2 so you can spend less time managing DB2 and more time innovating.
Data sheet: Toad for IBM DB2
Start a discussion about this blog in the Toad World® forum, Toad for IBM DB2.
If you think your colleagues would benefit from this blog, share it now on social media with the buttons located at the top of this blog post. Thanks!
Written by Ondrej Zizka