DB2极简安装步骤
RHEL7.2最简单的方式快速搭建DB2数据库
安装相关的依赖库
yum whatprovides libstdc++.so.
yum install libstdc++-4.8.5-4.el7.i686
yum install gcc* gcc-c++*
下载安装包并解压安装
tar -zxvf v11.1_linuxx64_server_t.tar.gz
cd server_t
./db2_install
创建用户并设定密码
groupadd -g 2000 db2iadm1
groupadd -g 2001 db2fadm1
useradd -m -g db2iadm1 -d /home/db2inst1 db2inst1
useradd -m -g db2fadm1 -d /home/db2fenc1 db2fenc1
passwd db2inst1
设置License并关联用户
cd /opt/ibm/db2/V11.1/adm/
chmod -R 775 *
./db2licm -a ~/db2/server_t/db2/license/db2ese_t.lic
cd /opt/ibm/db2/V11.1/instance/
chmod -R 775 *
./db2icrt -p 50000 -u db2fenc1 db2inst1
切换用户启动服务
su - db2inst1
db2sampl
db2start
db2 “select * from staff”