RPM fresh installation
The RPM package installation method installs Db2 by using native
Linux package management tools such as rpm, dnf,
yum, or zypper. The installation process is automated and does not
require a separate installer. By default, RPM installation uses Regular Install modes,
where you manually create and configure Db2 instances after installation. You can also enable Quick
Install mode to automatically create a default Db2 instance during installation.
RPM fresh installation procedure
- Download the RPM package from IBM Fix Central.
- Install the RPM package by running the following
command:
dnf install <new-package>.rpmWhen you install Db2® Server, Db2 Client, or Db2 Connect Server, install the RPM packages in the following order:
- Install the common RPM package.
- Install the product-specific RPM package.
- RPM installation performs the setup automatically. No separate installer is required.
- Optional: To create an instance during installation,
run:
export DB2RPMQUICKINSTALL=1; dnf install <package>.rpm - Configure the database and instance settings as required.
- Verify the installation by running
db2levelanddnflist installed
RPM quick installation (automatic instance creation)
Quick installation mode automatically creates a Db2 instance during RPM
installation, providing the fastest path to a working Db2 environment.
- To perform a quick RPM installation of Db2 and automatically create a default instance:
- Enable quick installation mode by setting the following environment variable:
export DB2RPMQUICKINSTALL=1 - Install the Db2 RPM package:
dnf install db2-ese-<version>.rpm - During installation, the RPM package automatically creates the following default users and instance:
- Db2 instance
owner:
db2inst1 - Fenced user:
db2fenc1
- Db2 instance
owner:
- Verify that the installation was completed successfully:
db2level - Verify that the instance was created:
db2ilist - Change the passwords for the default users:
passwd db2inst1andpasswd db2fenc1 - Start the Db2 instance:
su - db2inst1 -c db2start - Verify that the instance is running:
su - db2inst1 -c "db2 get instance"
Quick installation characteristics:
- Opt-in mode: Quick installation must be explicitly enabled by setting
DB2RPMQUICKINSTALL=1(Regular Installation is the default) - Automatic user creation: Creates db2inst1 (instance owner) and db2fenc1 (fenced user) automatically
- Password changes required: Customers must change passwords after installation by using
passwdcommand - Fastest deployment: Single command installation with automatic instance creation
- Limited customization: Uses default usernames and settings
- Ideal for: Quick deployments, testing, development, and automation scenarios
Regular installation (default mode):
- Default behavior: Regular installation is the default mode when
DB2RPMQUICKINSTALLis not set - Manual instance creation: Requires manual instance creation by using
db2icrtcommand after RPM installation - Full customization: Allows custom usernames, groups, paths, and instance configurations
- More control: Provides complete control over instance setup and configuration