Install db2 in linux, you can use a GUI mode or cmd mode.
the first user is for instance, second one is for fence. The option -d -m is to create its home folder.
GUI mode always needs a jre.
CMD mode do not need it.
This article will tell mainly about CMD mode install.
1.Run the install.sh to install.
2.Copy license file
//adm/db2licm -a /mnt/cd/db2/license/db2ese.lic
3.Enable SMS
/opt/IBM/db2/V8.1/cfg/db2ln
4.Add group:
groupadd db2iadm1
groupadd db2fadm1
groupadd db2usrgp
the first one is for instance user, second one is for fence user, third one is for normal user.
5.Add user:
useradd -g db2iadm1 -d /home/db2inst1 -m db2inst1
useradd -g db2fadm1 -d /home/db2fenc1 -m db2fenc1
6.Create instance
//instance/db2icrt -a server -u db2fenc1 db2inst1
that means create a instance using fence user as db2fenc1 instance user as db2inst1
7.Config db2setting
su db2inst1
First to switch to instance user to run db2 commands.
db2set
For example:
db2set DB2_EXTENDED_OPTIMIZATION=ON
db2set DB2_DISABLE_FLUSH_LOG=ON
db2set AUTOSTART=YES
db2set DB2_STRIPED_CONTAINERS=ON
db2set DB2_HASH_JOIN=Y
db2set DB2COMM=tcpip
db2set DB2_PARALLEL_IO=*
db2set DB2CODEPAGE=819
8.Update dbm cfg
db2 update dbm cfg using SVCENAME db2inst1
db2 update dbm cfg using INDEXREC ACCESS
Pay attention that the SVCENAME will be the name using in /etc/services
9.Add service port
echo "db2inst1 50000/tcp">>/etc/services
You can also edit the /etc/services to add the words.
Pay attention that the db2inst1 is SVCENAME db2inst1
10.Start db2
db2start