Installing the Db2 server by using the Db2 Setup wizard (Linux and UNIX)

This task describes how to download and install the Db2 Community Edition for Linux® and UNIX operating systems. Db2 Community Edition is a full-featured server installation. After a three-month trial period, you can apply either a Standard or Advanced license to receive product support and extra functions.

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 Community Edition installation image by signing in to the IBM Db2 Database page. This takes you to the Download Center from which you can download Db2 Community Edition.
  • 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

  1. From a terminal window, log in as root user: .
    su - root
  2. Create a folder under /home to store the Db2 Community Edition installation.
  3. Extract the downloaded installation package to the new folder.
  4. Open the installation folder and change access to the server_dec subfolder:
    chmod 777 server_dec
  5. Run the prerequisite check:
    ./db2prereqcheck -v 11.5.0.0s
  6. When all prerequisites are in place, run the command ./db2setup to load and start the Db2 Setup program. From the Welcome window, click New Install.
  7. 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/V11.5
Linux
/opt/ibm/db2/V11.5

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.
  • Follow the necessary postinstallation tasks.

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