Db2 installation methods
You can install Db2 database products in multiple methods. Each installation method is suited for specific circumstances.
The following table shows the installation methods that are available by operating system.
Installation method | Microsoft Windows | Linux® or UNIX |
---|---|---|
Db2 Setup wizard | Yes | Yes |
Db2 Docker image | Yes | Yes |
Response file installation | Yes | Yes |
db2_install command | No | Yes |
Payload file deployment | No | Yes |
The following list describes Db2 installation methods.
- Db2 Setup wizard
- The Db2 Setup wizard is a GUI installer available on Linux, UNIX, and Windows operating systems. The Db2
Setup wizard provides an easy-to-use interface for installing Db2 database products and
executing initial setup and configuration tasks. The Db2 Setup wizard can also create Db2 instances and response files that can be used to duplicate this installation on other workstations.Note: For non-root installations on Linux and UNIX operating systems, only one Db2 instance can exist. The Db2 Setup wizard automatically creates the non-root instance.
On Linux and UNIX operating systems, to install a Db2 product by using the Db2 Setup wizard, you require an X Window System (X11) to display the graphical user interface (GUI). To display the GUI on your local workstation, the X Window System software must be installed and running. You must also set the DISPLAY variable to the IP address of the workstation you use to install the Db2 product (export DISPLAY=<ip-address>:0.0). For example, export DISPLAY=192.168.1.2:0.0. For more information, see this article.
- Db2 Docker image
- Docker containers provide you with a virtualized run-time environment from which to run Db2, without impacting your existing operating system. You can now pull a Docker image of Db2 Community Edition from Docker Hub and install it in a Docker container on Windows 10, Mac OS 10.10 or higher, an a number of Linux distributions. See Downloading and installing Docker editions for more information.
- Response file installation
- A response file is a text file that contains setup and configuration values. The file is read by
the Db2 Setup program and the installation is executed according to the values
that were specified.
A response file installation is also referred to as a silent installation.
Another advantage to response files is that they provide access to parameters that cannot be set by using the Db2 Setup wizard.
On Linux and UNIX operating systems, if you embed the Db2 installation image in your own application, your application might receive installation progress information and prompts from the installer in computer-readable form. This behavior is controlled by the INTERACTIVE response file keyword.
A response file can be created in a number of ways:- Using the response file generator.
- You can use the response file generator to create a response file that replicates an existing installation. For example, you might install an IBM® data server client, fully configure the client, then generate a response file to replicate the installation and configuration of the client to other computers.
- Using the Db2 Setup wizard.
- The Db2 Setup wizard can create a response file based on the selections you
make as you proceed through the Db2 Setup wizard. Your selections are recorded
in a response file that you can save to a location on your system. If you select a partitioned
database installation, two response files are generated, one for the instance-owning computer and
one for participating computers.
One benefit of this installation method is that you can create a response file without performing an installation. This feature can be useful to capture the options that are required to install the Db2 database product. The response file can be used later to install the Db2 database product according to the exact options you specified.
You can export a client or server profile with the db2cfexp command to save your client or server configuration. Import the profile by using the db2cfimp command. A client or server profile that is exported with the db2cfexp command can also be imported during a response file installation by using the CLIENT_IMPORT_PROFILE keyword.
Export the client or server profile after you install and catalog any data sources.
- Customizing the sample response files that are provided for each Db2 database product.
- An alternative to using the response file generator or the Db2 Setup wizard to create a response file is to manually modify a sample response file. Sample response files are provided on the Db2 database installation media. The sample response files provide details about all the valid keywords for each product.
- db2_install command (Linux and UNIX operating systems only)
- The db2_install command installs all components for the Db2 database product you
specify with the English interface support. You can select additional languages to support with the
-L parameter. You cannot select or clear components.
Although the db2_install command installs all components for the Db2 database product you specify, it does not install user and group creation, instance creation, or configuration. This method of installation might be preferred in cases where configuration is to be done after installation. To configure your Db2 database product while you install it, you can use the Db2 Setup wizard.
On Linux and UNIX operating systems, if you embed the Db2 installation image in your own application, your application might receive installation progress information and prompts from the installer in computer-readable form.
This installation method requires manual configuration after the product files are deployed.
- Payload file deployment (Linux and UNIX only)
- This method is an advanced installation method that is not recommended for most users. It requires the user to physically install payload files. A payload file is a compressed .tar file that contains all of the files and metadata for an installable component.