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
本文提供了一种在Linux环境下使用命令行模式安装DB2的方法。包括运行安装脚本、复制许可文件、设置SMS、添加组及用户、创建实例、配置DB2参数、更新配置文件、添加服务端口并启动DB2服务。
492

被折叠的 条评论
为什么被折叠?



