龙空技术网

命令行安装IBM DB2数据库

攻城狮Jasonlong 39

前言:

现时你们对“安装db2无法进去启动板”大致比较重视,小伙伴们都想要知道一些“安装db2无法进去启动板”的相关知识。那么小编在网摘上汇集了一些对于“安装db2无法进去启动板””的相关资讯,希望看官们能喜欢,各位老铁们快快来学习一下吧!

DB2 V10.5.0.10 安装

本文档通过命令行方式Linux上安装db2
1.下载db2安装包

通过官网 下载DB2安装包,如果没有passport账号,只能下载Express版本的。

我这里下载的包是v10.5fp10_linuxx64_server_t.tar.gz解压包# tar -zxvf v10.5fp10_linuxx64_server_t.tar.gz
2. 预安装检查
root执行检查是否满足安装条件:#cd server_t/#lsdb2  db2checkCOL_readme.txt  db2checkCOL.tar.gz  db2ckupgrade  db2_deinstall  db2_install  db2ls  db2prereqcheck  db2setup  ibm_im  installFixPack  nlpack#./db2prereqcheck -p -v 10.5.0.10DBT3533I  The db2prereqcheck utility has confirmed that all installation prerequisites were met. 检查可能会发现缺包,然后我们通过yum来安装缺省包。可能会使用如下命令yum install -y pam* yum install -y pam*.i686yum install -y sg3_utils-*yum install -y kshyum install -y libstdc++.i686关闭selinux修改/etc/sysconfig/selinux中,SELINUX=disabled然后重启机器查看selinux状态# sestatus SELinux status:                 disabled
3. 创建用户和组
root执行创建组#groupadd -g 999 db2iadm1#groupadd -g 998 db2fadm1#groupadd -g 997 dasadm1用root用户创建用户#useradd -u 1004 -g db2iadm1 -m -d /home/db2inst1 db2inst1#useradd -u 1003 -g db2fadm1 -m -d /home/db2fenc1 db2fenc1#useradd -u 1002 -g dasadm1 -m -d /home/dasusr1 dasusr1
4. 安装DB2
root执行# ./db2_installDBI1324W  Support of the db2_install command is deprecated.Default directory for installation of products - /opt/ibm/db2/V10.5***********************************************************Install into default directory (/opt/ibm/db2/V10.5) ? [yes/no] yes   【需要输入后Enter】Specify one of the following keywords to install DB2 products.  SERVER   CONSV   EXP   CLIENT   RTCL Enter "help" to redisplay product names.Enter "quit" to exit.***********************************************************SERVER   【需要输入后Enter】***********************************************************Do you want to install the DB2 pureScale Feature? [yes/no] no           【需要输入后Enter】DB2 installation is being initialized.Task #1 startDescription: Checking license agreement acceptance Estimated time 1 second(s) Task #1 end 。。。。  此处省略1万字Task #50 startDescription: Updating global profile registry Estimated time 3 second(s) Task #50 end The execution completed successfully.For more information see the DB2 installation log at"/tmp/db2_install.log.2691".安装成功,并且没有报错。
5. 创建实例
root执行建实例#/opt/ibm/db2/V10.5/instance/db2icrt -u db2fenc1 db2inst1db2inst1执行设置TCPIP端口$db2 update dbm cfg using SVCENAME 50000启用端口,需要重启实例才能生效$db2set DB2COMM=tcpip重启实例$db2stop force$db2start
6. 安装db2许可证
这里要有passport账号才能下载到,如果是express版本,不用执行,默认试用90天$/opt/ibm/db2/V10.5/adm/db2licm -a /db2/license/db2ese.lic查看许可$db2licm -lProduct name:                     "DB2 Advanced Enterprise Server Edition"License type:                     "CPU Option"Expiry date:                      "Permanent"    [这里Permanent,即可]Product identifier:               "db2aese"Version information:              "10.5"Enforcement policy:               "Soft Stop"到这里DB2 10.5.0.10就安装成功了。
7. 创建sample数据库
db2inst1执行创建sample数据库$db2sampl连接sample数据库$db2 connect to sample建表/插数/查询$db2 "create table t1(c1 varchar(20))"$db2 "insert into t1 values(1)"$db2 "select * from t1"
8. 删除DB2软件
root执行删除实例,记得先把实例停掉,否则会失败#/opt/ibm/db2/V10.5/instance/db2idrop db2inst1卸载db2#/opt/ibm/db2/V10.5/install/db2_deinstall -a删除db2用户#userdel -r db2inst1#userdel -r db2fenc1#userdel -r dasusr1删除db2组#groupdel db2iadm1#groupdel db2fadm1#groupdel dasadm1

标签: #安装db2无法进去启动板