DB2 Server Installers

Dean Compher

27 December 2012



When you need to install DB2 on Linux, UNIX or Windows you probably only consider using the GUI (wizard) menu driven install, but it is useful to know that there are other options.  In this article I will discuss the various ways of installing DB2 software and creating instances.  You don’t always have to create an instance when you install the software and I’ll discuss why there are times that you may want to do that. 


Here is a summary of the ways you can install DB2:


GUI Menu



GUI menu driven install.  Execute db2setup or db2setup.exe with no parameters.

Response File

db2setup –r <response_file_name.rsp>

Response File Install from command line.  All install parameters defined in the response file.



Character based menu driven install.  Linux and UNIX Only.  SW Install only – No instance created.

Payload File

Install from a TAR ball.  Linux and Unix Only.  NOT Recommended


Before you install a DB2 server, I highly recommend that you review the requirements and read about the process in the Installing DB2 Servers manual.  It gives a good overview plus instructions for individual operating systems.  You can now run the db2prereqcheck command to verify that your system is ready for the install.  You can get the command from the DB2 install file that you download.  After downloading and extracting the files, just search for “db2prereqcheck” using the operating systems “find” or “search” command. 


Further, it is always good apply the latest or relatively new fix pack after installing the GA version of DB2 that you download from the web.  You can find the link for downloading fix packs on db2Dean’s “Favorite Links” page.


GUI Menu


I recommend this method for most installations especially if you install only infrequently.  To invoke the menu install, just run the “db2setup” or “db2setup.exe” command from the install media.  This method walks you through the process in an easy to follow wizard.  However, as I noted above you should review the installation manual so that you know what to expect.  For example, DB2 will want to create some new user ids and groups or use some existing ones.  You will want to understand this and other things before beginning your install. 


If you are installing on UNIX or Linux then you need to have X windows installed and configured to allow the GUI menu to be displayed.  Contact your system administrator if you are unfamiliar with X windows.  If you do not have X available then you will need to use one of the other installation methods listed below. 


It is always a good idea to check the box in the menu install indicating that you want to create a response file.  With this file you can create an exact or similar install on another machine or just review it to see which features were or were not installed. 


Response File


I really like the response file installation.  To invoke it your run the “db2setup –r <resp_file_name.rsp>” command from the command line.  You can use it to install both the software and the first instance together or to install just the DB2 software or just create a new instance if the software is already installed.  I like using the response file because all install parameters, all instance parameters, and all DB and DBM configure parameters are listed with their default values.  You can then change just the ones that interest you and have a record of all settings as of the time that the install was done.  This is especially wonderful when you need to install several nearly identical servers or instances or even to script your installs.  I also like the response file install because I can review all of the install options in one place without having to drill down into lots of submenus.  


You do not need to write the response file from scratch.  IBM provides sample response files showing all of the parameters with nearly all of those parameters being set to the default values.  I highly recommend starting with a sample response file and modifying it to your liking.  There are sample files for all types of installs, including the various types of clients and the various server editions of DB2 including Workgroup and ESE.  You can download many of these from the Sample Response Files page on the Information Center and the ones for your edition are included in the install media that you download.  To get the sample, just untar and/or uncompress the media and then look in the directory “db2/platform/samples” where “platform” refers to your hardware platform. 


Another way to get a customized response file is to check the option to save a response file when using the GUI install.  This creates a full response file that includes parameters set to the values you picked in your GUI driven install.  If you have an existing instance that you really like, you can generate a response file from it using the db2rspgn command. 


You can read all about how to do a response file install in the Installing DB2 Servers manual and in the Response File Install Section of the Information Center including definitions of all of the response file key words (parameters).





This is the command line menu driven installer.  It is only for Linux and UNIX systems and only installs the DB2 software.  For most cases where you need to install from the command line, I highly recommend that you use the response file method described above  The db2_install command does not create an instance and does not create the users and groups needed by an instance.  As of DB2 v10, the db2_install command has been deprecated which means that it will not be improved and it may go away in a future version.  You can read more about the db2_install command in the information center.


Once you have installed the software with the db2_install command, you will need to create your instance with the db2icrt command and other commands or using Data Studio from your client.  


Payload File



I strongly encourage you NOT to use this install method.  Using it in production will likely cause many headaches over an extended period of time!  Most people who I have seen use this method are able to get it working, but over time they get strange errors and crashes that seem to crop up regularly. 


You use this method on UNIX and Linux servers by using the “tar” command to extract the entire install directory into a file.  You then take it to another server and extract the tar file recreating all of the files in their appropriate directories.  I think that the reason that this doesn’t work that well is that the installer detects information about the environment on which you are installing and customizes the installation for that environment.  When you take that install and put it on another machine, the slight environmental differences cause problems that only happen under certain circumstances. 


Installing Software Only


Any of the above install methods can be used to install only the software and not install a database instance.  This is often useful when you want to install a new version of the software for an upgrade.  You can usually get away with installing a new version of DB2 say, v10.1, while the previous version, say v9.7, continues to run happily.  This is not recommended, but can be done.  This allows you to minimize an outage on an existing system where everything keeps running while you install the new software, and only need to stop your instance(s) when you are actually ready to upgrade the instances. 


Creating New Instances


If you only installed the DB2 Software on a new server and don’t have any instances or need to install an additional instance you have a number of options.  You can use the GUI Menu install or a response file install with the correct parameters to do this.   You can also use the db2icrt command to create a new instance.  


Non Root Install


It is generally not a good idea to use a non-root install in production because of all of the limitations such as only being able to have one instance.  However, there are times when it is useful.  You can use any of the above methods.  To read more about this method please see the non-root install page in the Information Center.


Version Upgrades


One of the top reasons for installing DB2 is to upgrade the version that you are running.  There are quite a few considerations when upgrading an existing database.  So before you begin, I highly recommend reviewing the DB2 Upgrade Portal





I wanted to write this article to remind everyone that there are several ways to install DB2.   If you notice any detailsfeatures you like that I did not include here, please add them to my Facebook Page or my db2Dean and Friends Community and share your thoughts about them.


HOME | Search