Installing Db2 on AIX or Linux
You can install Db2® as a root user or non-root user on an AIX® or Linux® operating system by using the Db2 Setup program. To install Db2 as a non-root user, the user must have sudo privileges on the target AIX or Linux server.
Before you begin
The X Window System is required on the AIX or Linux server to install Db2 by using the installation program.
If you want to install Db2 as a non-root user, have your system administrator complete the following tasks on the
target server before you begin the installation:
- If you are installing Db2 on an AIX server, install sudo on the server. The default AIX distribution does not include sudo. To get the sudo installation package, go to https://ibm.biz/BdftKL. Find sudo-version in the Package column, and click RPM to download the package.
- Ensure that the non-root user has sudo privileges for the following commands on the server:
- xauth (Enables the non-root user to provide access to their X Window System display for the root user.)
- db2setup (Enables the non-root user to launch the Db2 installation program.)
You must enter the full path to the commands when you configure the sudo privileges. For example:username ALL=(root) SETENV: /usr/bin/xauth,/home/username/Downloads/DB2/server_dec/db2setup
- Ensure that the following requirements are met to enable the installation of Db2 by using the Setup program:
- The non-root user is able to use the X Window System on the target server and the X Window
System
DISPLAY
environment variable is set correctly for the not-root user. - The
DISPLAY
environment variable is preserved in the sudo environment. - The root user has access to the X Window System display that is owned by the non-root user.
- The non-root user is able to use the X Window System on the target server and the X Window
System
- If you are installing Db2 on an AIX server, ensure that the
ODMDIR
environment variable is preserved in the sudo environment.
Procedure
What to do next
Root
user
DB2_installation_directory/bin/db2iauto -on DB2_instance_name
Non-root
user
Where
DB2_installation_directory is the location of Db2 and DB2_instance_name is the instance that you created when you
installed Db2. The default instance name is
db2inst1.sudo DB2_installation_directory/bin/db2iauto -on DB2_instance_name