Test environment: slse11.2, 10.4, RedHat5.3, CentOS5
Decompress the package
Gavin:/Oracle # tar-xzvf db2exc_975_LNX_x86.tar.gz
Cd/oracle/special_27924_linuxia32_expc/
Graphical interface Installation
./Db2setup
Manually install db
./Db2_install [default path:/opt/ibm/db2/V9.7]
If you need to upgrade to the decompressed upgrade package, execute
./InstallFixPack-f level-B/opt/ibm/db2/V9.7
Register
/Opt/ibm/db2/V9.7/adm/db2licm-a/oracle/special_27924_linuxia32_expc/db2/license/db2ee. lic
Db2 does not have an independent user management system and must use OS users to provide security authentication.
Create three management user groups, namely the das Management Group, instance group, and protected group.
Groupadd-g 900 db2agrp
Groupadd-g 901 db2igrp
Groupadd-g 902 db2fgrp
Add User
Useradd-m-d/home/db2das-g db2agrp-u 803 db2das
Useradd-m-d/home/db2inst1-g db2igrp-u 801 db2inst1
Useradd-m-d/home/db2fenc1-g db2fgrp-u 802 db2fenc1
Set Password
Passwd db2inst1
Passwd db2fenc1
Passwd db2das
Check whether the creation is successful
Cat/etc/passwd | grep db2
Cat/etc/group | grep db2
To create an instance, you must have a db2 user to manage DB2.
/Opt/ibm/db2/V9.7/instance #./dascrt-u db2das
./Db2icrt-a server-u db2inst1 db2inst1
Generally, the Instance name is the same as the management user name.
Start the db2admin Manager
Su-db2das
Db2admin start
Start an instance
Su-db2inst1
Db2start
Set to automatically start the database on linux
./Db2iauto-on db2inst1
Modify the service port of db2 50001. The default port is 50000.
Db2 update dbm cfg using SVCENAME 50001
View instance configuration information
Db2 get dbm cfg
Change the database connection method to TCPIP
Db2set DB2COMM = TCPIP
Disable an instance
Db2stop