This article mainly describes the correct installation and configuration of IBM/db2_v9.20.linux. If you are interested in the correct installation and configuration of IBM/db2_v9.20.linux, you can click to view the following articles. The following describes the specific solution and hope it will be helpful for your future study.
IBM, LinuxIBM, Linux
1. install IBM/DB2 V9.1 Linux
Download the Installation File db2exc_912_LNX_x86.tar.gz and decompress it to ext2/3.
# Cd db2exc_912_LNX_x86
#./Db2setup
(1) The java installation interface is displayed. install new instance
(2) Use "Typical Mode" and select the installation directory. The default value is DB2_root =/opt/ibm/db2/V9.1/
# Echo DB2_root =/opt/ibm/db2/V9.1/>/etc/profile
(3) and create db2inst by default? , Db2fenc? , Db2adsusr? These users
The most important thing is the local instance Management User db2inst? It manages database instances
(4) Create an Instance and continue the installation. If the successful result is displayed, the installation is successful.
(5) # ps-e | grep db2 should be able to see three processes with different names
(6) # tail/etc/inittab # The last line is the method for starting db2.
Fmc: 2345: respawn:/opt/ibm/db2/V9.1/bin/db2fmcd # DB2 Fault Monitor Coordinator
I used to find the db2 process in/etc/init. d for a long time. Later I realized that the db2 process was directly released through the init spawn.
2. Configure database development for IBM/DB2 and CLI/ODBC connection
# Su db2inst1
$ Cd $ DB2_ROOT
# Catalog ):
$./Db2 catalog tcpip node remote server
$./Db2 catalog db at node
$./Db2 connect to user using
# Uncatalog ):
$./Db2 uncatalog db
$./Db2 uncatalog node
3. Modify and use the CLI/ODBC of IBM/DB2 for program development.
(1) If you do not want to use a db2 instance, but want to use CLI/ODBC for program development,
You can comment on the phrase "Start db2" in "/etc/inittab" and give up starting the IBM/DB2 database service.
(2) environment variable configuration file:/home/db2inst1/sqllib/db2profile
Check/etc/profile to make sure the following two statements are provided (add or modify ):
- export DB2INSTANCE=db2inst1
- export PATH=$DB2_ROOT/binPATH
- export LD_LIBRARY_PATH=$DB2_ROOT/lib32LD_LIBRARY_PATH
(3) Relationship between the address of the target machine in the cataloguing and the odbc dsn, see 2
The most important header files (include) and Libraries (lib) in CLI/ODBC)
$ DB2_ROOT/lib32 or its connection/home/db2inst1/sqllib/lib, the most important of which is libdb2.so
4. Modify and uninstall DB2
Perform reverse cataloguing () first, as shown in step 2.
- # su db2inst1
- $ cd $DB2_ROOT/install
- $ ./db2_deinstall -a
Wait for the end...
Modify the statement for starting db2 in the/etc/inittab to ensure that the IBM/DB2 database service is not started.