Installing Db2 servers using the Db2 Setup wizard (Linux and UNIX)

This task describes how to start the Db2 Setup wizard on Linux® and UNIX operating systems. The Db2 Setup wizard is used to define your installation preferences and to install your Db2 database product on your system. If you are installing the Db2 pureScale® Feature, see topic Installing a Db2 pureScale environment.

Before you begin

Before you start the Db2 Setup wizard:
  • If you are planning on setting up a partitioned database environment, refer to the task in the related links.
  • Ensure that your system meets installation, memory, and disk requirements.
  • Ensure that you installed a supported browser.
  • You can install a Db2 database server by using either root or non-root authority. For more information about non-root installation, see the related links.
  • The Db2 database product image must be available. You can obtain a Db2 installation image either by purchasing a physical Db2 database product DVD, or by downloading an installation image from Passport Advantage®.
  • If you are installing a non-English version of a Db2 database product, you must have the appropriate National Language Packages.
  • The Db2 Setup wizard is a graphical installer. 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 Remote X11 Windows to AIX on the Hybrid Data Management community site.
  • If you are using the security software in your environment, you must manually create required Db2 users before you start the Db2 Setup wizard.


Restrictions

  • You cannot have more than one instance of the Db2 Setup wizard running in any user account.
  • The use of XML features is restricted to a database that is defined with the code set UTF-8 and has only one database partition.
  • The Db2 Setup wizard fields do not accept non-English characters.

Procedure

To start the Db2 Setup wizard:

  1. If you have a physical Db2 database product DVD, change to the directory where the Db2 database product DVD is mounted by entering the following command:
       cd /dvdrom
    where /dvdrom represents the mount point of the Db2 database product DVD.
  2. If you downloaded the Db2 database product image, you must extract and untar the product file.
    1. Extract the product file:
      gzip -d product.tar.gz
      
      where product is the name of the product that you downloaded.
    2. Untar the product file:
      On Linux operating systems
      tar -xvf product.tar
      On AIX® operating systems
      gnutar -xvf product.tar
      where product is the name of the product that you downloaded.
    3. Change directory:
      cd ./product
      where product is the name of the product that you downloaded.
    Note: If you downloaded a National Language Package, untar it into the same directory. This step creates the subdirectories (for example ./nlpack) in the same directory, and allows the installer to automatically find the installation images without prompting.
  3. Enter the ./db2setup command from the directory where the database product image resides to start the Db2 Setup wizard.
  4. The Db2 Setup wizard opens. Launch the installation by clicking New Install.

    Proceed through the installation by following the Db2 Setup wizard's prompts.

Results

For non-root installations, Db2 database products are always installed in the $HOME/sqllib directory, where $HOME represents the non-root user's home directory.

For root installations, Db2 database products are installed, by default, in one of the following directories:
AIX
/opt/IBM/db2/11.1
Linux
/opt/ibm/db2/11.1

If you are installing on a system where this directory is already being used, the Db2 database product installation path has _xx added to it. The _xx are digits, starting at 01 and increasing, depending on how many Db2 copies you have installed.

You can also specify your own Db2 database product installation path.

Db2 installation paths have the following rules:
  • Can include lowercase letters (a-z), uppercase letters (A-Z), and the underscore character ( _ )
  • Cannot exceed 128 characters
  • Cannot contain spaces
  • Cannot contain characters that are other than English characters
  • The path name cannot be a subdirectory of an existing Db2 installation.
  • The installation paths cannot be symbolic links.
The installation log files are:
  • The Db2 setup log file. This file captures all Db2 installation information, including errors.
    • For root installations, the Db2 setup log file name is db2setup.log.
    • For non-root installations, the Db2 setup log file name is db2setup_username.log, where username is the non-root user ID under which the installation was performed.
  • The Db2 error log file. This file captures any error output that is returned by Java™ (for example, exceptions and trap information).
    • For root installations, the Db2 error log file name is db2setup.err.
    • For non-root installations, the Db2 error log file name is db2setup_username.err, where username is the non-root user ID under which the installation was performed.

By default, these log files are located in the /tmp directory. You can specify the location of the log files.

There is no longer a db2setup.his file. Instead, the Db2 installer saves a copy of the Db2 setup log file in the DB2_DIR/install/logs/ directory, and renames it db2install.history. If the name exists, then the Db2 installer renames it db2install.history.xxxx, where xxxx is 0000-9999, depending on the number of installations you have on that machine.

Each installation copy has a separate list of history files. If an installation copy is removed, the history files under this install path are removed as well. This copying action is done near the end of the installation and if the program is stopped or aborted before completion, then the history file will not be created.

What to do next

  • Verify your installation.
  • Perform the necessary post-installation tasks.

National Language Packs can also be installed by running the ./db2setup command from the directory, where the National Language Pack resides, after you install the Db2 database product.

On Linux x86, if you want your Db2 database product to have access to Db2 documentation either on your local computer or on another computer on your network, then you must install the Db2 Information Center. The Db2 Information Center contains documentation for the Db2 database system and Db2 related products.

Db2 Workgroup Server Edition memory limits

If you are installing Db2 Workgroup Server Edition, the maximum allowed memory for the instance is 64 GB.

The amount of memory that is allocated to the instance is determined by the INSTANCE_MEMORY database manager configuration parameter.
Important notes when you upgrade from 9.7, 10.1, or 10.5:
  • When you upgrade from 9.7, 10.1, or 10.5 Db2 database product if the memory configuration exceeds the allowed limit, the database product might not start after you upgrade to the current version.
  • The self tuning memory manager will not increase your overall instance memory limit beyond the license limits.