设为首页 收藏本站
查看: 1784|回复: 0

[经验分享] 安装LDAP 与 DB2 Server 全过程

[复制链接]

尚未签到

发表于 2016-11-13 09:52:43 | 显示全部楼层 |阅读模式
  安装LDAP 与 DB2 Server
  
3.1.1. 安装DB2 Enterprise Server Edition V8.1
1. 以root用户登录操作系统
2. 在DB2安装介质的根目录下,运行./db2_install
3. 安装进程提示安装产品,输入DB2.ESE
4. 安装结束
3.1.2. 安装DB2 V8.1 Fixpack6
2. 安装完毕DB2 ESE V8.1后,紧接着就要安装Fixpack6。
3. 运行./installFixPak
4. 安装结束。
  
3.1.3. DB2安装后续任务
所有任务都是以root用户登录。
1. 创建DB2组和用户
i. 创建instance owner组,fenced用户组,DAS用户组
a) groupadd –g 999 db2iadm1
b) groupadd –g 998 db2fadm1
c) groupadd –g 997 dasadm1
ii. 创建DB2用户
a) useradd –u 1004 –g db2iamd1 –m –d /home/db2inst1 db2inst1 –p db2inst1
b) useradd –u 1003 –g db2fadm1 –m –d /home/db2fenc1 db2fenc1 –p db2fenc1
c) useradd –u 1002 –g dasadm1 –m –d /home/dasusr1 dasusr1 –p dasusr1
       注:以上步骤也可以用yast中的用户和组管理功能来实现
2. 创建DB2实例
i. cd /opt/IBM/db2/V8.1/instantce
ii. 执行命令./db2icrt –u db2fenc1 db2inst1
3. 更新DB2 License Key
i. DB2 License Key存在于/var/lum/nodelock文件,如果没有请手工创建。
ii. 在DB2安装介质中,根目录下的license目录中有一个db2ese.lic。用vi打开这个文件,拷贝如下文本到nodelock中。
# 5765F41 DB2 Enterprise Server Edition, Expiration date: 2037-12-31
5fbee0ee6feb.02.09.15.0f.48.00.00.00 qifx7bndg9b48n7gafpsa "" "8.1"
#[admin_comment] "IBM Toronto Lab" "DB2 Enterprise Server Edition" "2145848400" "0" "1"
4. 配置DB2实例的TCP/IP
i. 创建完DB2实例后,在/etc/services会加入如下服务名和端口号,如果没有请手工加入。
DB2_db2inst1 60000/tcp   # DB2 connection service port
DB2_db2inst1_1 60001/tcp  # DB2 interrupt service port
ii. su – db2inst1
iii. db2 UPDATE DBM CFG USING SVCENAME DB2_db2inst1
iv. db2set DB2COMM=tcpip
v. db2stop
vi. db2start
5. 创建DB2管理服务器
i. cd /opt/IBM/db2/V8.1/instantce
ii. 执行命令./dascrt –u dasusr1
iii. su – dasusr1
iv. 执行db2admin start检验管理服务器是否创建成功
3.1.4. 创建WPS数据库
1. su – db2inst1
2. 执行如下命令创建数据库(可以把以下命令编写到一个shell脚本中执行)
db2 "create database wps51 using codeset UTF-8 territory us"
db2 "update database configuration for wps51 using applheapsz 16384 app_ctl_heap_sz 8192"
db2 "update database configuration for wps51 using stmtheap 60000"
db2 "update database configuration for wps51 using locklist 400"
db2 "update database configuration for wps51 using indexrec RESTART"
db2 "update database configuration for wps51 using logfilsiz 1000"
db2 "update database configuration for wps51 using logprimary 12"
db2 "update database configuration for wps51 using logsecond 10"
db2set DB2_RR_TO_RS=yes
db2set DB2_EVALUNCOMMITTED=YES
db2set DB2_INLIST_TO_NLJN=YES
db2 "create database fdbk51 using codeset UTF-8 territory us collate using identity"
db2 "update database configuration for fdbk51 using applheapsz 5120"
db2 "update database configuration for fdbk51 using logfilsiz 4096"
db2 "update database configuration for fdbk51 using logprimary 4"
db2 "update database configuration for fdbk51 using logsecond 25"
db2 "create database lm51 using codeset UTF-8 territory us"
db2 "create database jcr51 using codeset UTF-8 territory us"
db2 "update database manager configuration using QUERY_HEAP_SZ 32768"
db2 "update database manager configuration using UDF_MEM_SZ 7000"
db2 "update database manager configuration using SHEAPTHRES 10000"
db2 "update database manager configuration using MAXAGENTS 500"
db2 "update database manager configuration using DFT_MON_TIMESTAMP OFF"
db2 "update database configuration for jcr51 using LOCKTIMEOUT 30"
db2 "update database configuration for jcr51 using LOCKLIST 1000"
db2 "update database configuration for jcr51 using STMTHEAP 16384"
db2 "update database configuration for jcr51 using AVG_APPLS 5"
db2 "update database configuration for jcr51 using SORTHEAP 256"
db2 "update database configuration for jcr51 using LOGPRIMARY 10"
db2 "update database configuration for jcr51 using LOGFILSIZ 1000"
db2 "update database configuration for jcr51 using LOGSECOND 20"
db2 "update database configuration for jcr51 using LOGBUFSZ 32"
db2 "update database configuration for jcr51 using MAXAPPLS 200"
db2 "update database configuration for jcr51 using APPLHEAPSZ 4096"
db2 "update database configuration for jcr51 using DFT_QUERYOPT 2"
db2 "update database configuration for jcr51 using DBHEAP 2400"
db2 "update database configuration for jcr51 using APP_CTL_HEAP_SZ 20000"
db2 "connect to jcr51 user db2inst1 using db2inst1"
db2 "create bufferpool ICMLSFREQBP4 SIZE 1000 PAGESIZE 4 K"
db2 "create bufferpool ICMLSVOLATILEBP4 SIZE 8000 PAGESIZE 4 K"
db2 "create bufferpool ICMLSMAINBP32 SIZE 8000 PAGESIZE 32 K"
db2 "create bufferpool CMBMAIN4 SIZE 1000 PAGESIZE 4 K"
db2 "create bufferpool OBJECTPOOL SIZE 2000 PAGESIZE 32 K"
db2 "create bufferpool OBJPARTSPOOL SIZE 200 PAGESIZE 32 K"
db2 "create bufferpool SMSPOOL SIZE 500 PAGESIZE 4 K"
db2 "create bufferpool PARTSPOOL SIZE 100 PAGESIZE 32 K"
db2 "create bufferpool BLOBPOOL SIZE 1000 PAGESIZE 32 K"
db2 "create bufferpool REPLICAPOOL SIZE 1000 PAGESIZE 32 K"
db2 "create bufferpool TRACKINGPOOL SIZE 250 PAGESIZE 4 K"
db2 "create bufferpool VALIDATEPOOL SIZE 500 PAGESIZE 32 K"
db2 "create regular tablespace ICMLFQ32 PAGESIZE 32 K managed by system using ('ICMLFQ32') bufferpool ICMLSMAINBP32"
db2 "create regular tablespace ICMLNF32 PAGESIZE 32 K managed by system using ('ICMLNF32') bufferpool ICMLSMAINBP32"
db2 "create regular tablespace ICMVFQ04 PAGESIZE 4 K managed by system using ('ICMVFQ04') bufferpool ICMLSVOLATILEBP4"
db2 "create regular tablespace ICMSFQ04 PAGESIZE 4 K managed by system using ('ICMSFQ04') bufferpool ICMLSFREQBP4"
db2 "create regular tablespace CMBINV04 PAGESIZE 4 K managed by system using ('CMBINV04') bufferpool CMBMAIN4"
db2 "create system temporary tablespace ICMLSSYSTSPACE32 PAGESIZE 32 K managed by system using ('icmlssystspace32') bufferpool ICMLSMAINBP32"
db2 "create system temporary tablespace ICMLSSYSTSPACE4 PAGESIZE 4 K managed by system using ('icmlssystspace4') bufferpool ICMLSVOLATILEBP4"
db2 "create regular tablespace OBJECTS PAGESIZE 32 K managed by system using ('objects') bufferpool OBJECTPOOL"
db2 "create regular tablespace OBJPARTS PAGESIZE 32 K managed by system using ('objparts') bufferpool OBJPARTSPOOL"
db2 "create regular tablespace SMS PAGESIZE 4 K managed by system using ('sms') bufferpool SMSPOOL"
db2 "create regular tablespace BLOBS PAGESIZE 32 K managed by system using ('blobs') bufferpool BLOBPOOL"
db2 "create regular tablespace REPLICAS PAGESIZE 32 K managed by system using ('replicas') bufferpool REPLICAPOOL"
db2 "create regular tablespace TRACKING PAGESIZE 4 K managed by system using ('tracking') bufferpool TRACKINGPOOL"
db2 "create regular tablespace VALIDATEITM PAGESIZE 32 K managed by system using ('validateitm') bufferpool VALIDATEPOOL"
db2 disconnect jcr51
db2 TERMINATE
3. 执行connect to wps51 user db2inst1 using db2inst1,检验是否创建成功。(分别检验fdbk51, lm51, jcr51)
  
-------------------------------------------------------
安装 DB2 客户机
  2.3. 安装配置DB2管理客户机
进行此步骤之前,先完成安装DB2任务。
1. 以root用户登录操作系统
2. 在DB2安装介质的根目录下,运行./db2_install
3. 安装进程提示安装产品,输入DB2.ADMCL
4. 安装结束
5. 安装Fixpack6,步骤如安装DB2 V8.1 Fixpack6
6. 创建DB2组和用户,步骤如DB2安装后续任务中创建DB2组和用户
7. 创建DB2实例,步骤如DB2安装后续任务中创建DB2实例
8. 配置DB2管理客户机
i. 编辑/etc/services,加入DB2连接的服务名和端口号
 DB2_db2inst1  60000/tcp  #DB2 connection service port
ii. su – db2inst1
iii. db2set DB2COMM=tcpip
iv. 编目远程DB2服务器节点
  执行db2 catalog tcpip node "WPS_NODE" remote "192.168.0.61" server DB2_db2inst1
  注:hostname为远程服务器的主机名;nodename通常为为远程服务器的机器名
v. 编目远程DB2数据库
分别执行 db2 catalog db WPS51 as WPS51N at node "WPS_NODE"
db2 catalog db JCR51 as JCR51N at node "WPS_NODE"
db2 catalog db FDBK51 as FDBK51N at node "WPS_NODE"
db2 catalog db LM51 as LM51N at node "WPS_NODE"
vi. 测试连接
分别执行
db2 connect to WPS51N user db2inst1 using db2inst1
db2 connect to JCR51N user db2inst1 using db2inst1
db2 connect to FDBK51N user db2inst1 using db2inst1
db2 connect to LM51N user db2inst1 using db2inst1
  
---------------------------------------------------------------------
  以上操作只是经本人在 RF linux 4.1 测试通过,如果有什么问题请指证

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-299579-1-1.html 上篇帖子: db2 jdbc连接方式 下篇帖子: DB2 SQLCODE 大全
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表