This article describes how to manually install DB2 on the Linux 9 Operating System and install DB2 V8.1. /dbsetup has the following error: (it is suspected that DB2 for Linux V8.1 does not support graphical installation of Redhat Linux 9. for details, refer to: DB2 for Linux ).
Platform environment: Redhat Linux 9 (with pdksh installed), DB2 for Linux V8.1
1. Automatic Installation
Reference: Quick Start of Linux application 2003: Install DB2 V8.1
Run./dbsetup
The following error occurs:
(We suspect that DB2 for Linux V8.1 does not support graphical installation of Redhat Linux 9. for details, refer to: DB2 for Linux)
/Mnt/tmp/rhce/db2/db2/linux/install/db2jinst: line 130: error in section 2948 $ JAVA_PATH/$ JAVA_INTERPRETER $ JAVA_OPTIONS-cp $ JAVA_CLASSPATH $ DB2SetupRun "$ @" 2>/tmp/db2setup. err. running
2. Manually install DB2
Reference: another method for installing DB2 V8.1 on UNIX platforms
The procedure is as follows:
1. Run./db2_install.
② Create a user ID:
Groupadd db2grp1
Groupadd db2fgrp1
Groupadd dasadm1
Useradd-g db2grp1-m-d/home/db2inst1-p "" db2inst1
Useradd-g db2fgrp1-m-d/home/db2fenc1-p "db2fenc1
Useradd-g dasadm1-m-d/home/dasusr1-p "" dasusr1
Note: The passwords of the above three users are empty. When you use the su command to switch to the corresponding user, use the passwd command to set the password.
③ Create an instance:
First, use the following command to create and manage server instances:
/Opt/IBM/db2/V8.1/instance/dascrt-u dasusr1
Run the following command to create the database instance db2inst1:
/Opt/IBM/db2/V8.1/instance/db2icrt-u db2fenc1 db2inst1
This command has some optional parameters. In particular, the-a option allows us to specify an authentication mechanism different from the default "SERVER.
④ Create a shared library link:
/Opt/IBM/db2/V8.1/cfg/db2ln
⑤ Set the DB2 instance environment variables:
Use the su command to switch to the user terminal of the db2 instance:
Su db2inst1
Db2set DB2AUTOSTART = YES (set db2 to automatically start with linux)
Db2set DB2COMM = tcpip (set db2 to support the tcpip protocol for client access)
⑥ Set the service port
Enter the db2 Command Line Mode
Update database manager configuration using svcename server1 | 50000
Server1 | 50000 either. server1 | indicates the service name and 50000 indicates the port number.
Get database manager configuration
7. Create a database
Create database dbname
Consumer Client Connection
Enter the following command in command line mode:
DB2 catalog tcpip node mynode REMOTE hostname SERVER 50000
DB2 catalog database dbname AS dbname at node mynode
You can test the connection by adding an ODBC source. The above content is an introduction to manual installation of DB2 on Linux9. I hope you will have some gains.