IBM CDC系列CDC的安装

五陵年少金市东,银鞍白马渡春风。这篇文章主要讲述IBM CDC系列CDC的安装相关的知识,希望能为你提供帮助。
1 安装前的确认作业
1.1 CDC组件说明CDC整体由以下几个组件构建:
(1)CDC实例引擎,简称IIDR,用于连接目标数据库进行数据捕获或数据落实的组件,可以安装在DB的本地或通过REMOTE(JDBC)的方式连接DB;
(2)Access Server,简称AS,用于连接及管理CDC引擎,配置完成后CDC引擎间会自行进行通讯,即使AS宕机也不影响CDC的正常复制;
(3)Management Console,简称MC,用于操作AS的UI工具,可以代替AS中的命令行操作。

1.2 安装包说明CDC三个组件的安装包如下,一般建议CDC引擎及AS安装在单独的linux服务器上,MC自行安装在windows上,需要特别注意的是,AS与MC的版本必须保持一致,否则会导致组件间通讯异常的情况。

2 安装Access Server
2.1 用户及安装目录不能使用root用户进行安装,故需要新建一个操作账号。

useradd cdcadmin

创建安装目录。
[root@localhost ~]# mkdir -p /opt/IBM/InfoSphereDataReplication/AccessServer
[root@localhost ~]# chown -R cdcadmin:cdcadmin /opt/IBM/InfoSphereDataReplication/AccessServer

2.2 准备安装包拷贝安装包至本机,使用chmod +x 命令对安装赋予执行权限。
[root@localhost ~]# cd /home/softwares/
[root@localhost softwares]# ll
total 291924
-rwxr-xr-x. 1 root root 298927287 May 23 20:50 iidraccess-11.4.0.4-11086-linux-x86-setup.bin
[root@localhost softwares]# ls
iidraccess-11.4.0.4-11086-linux-x86-setup.bin
[root@localhost softwares]# chmod +x iidraccess-11.4.0.4-11086-linux-x86-setup.bin
[root@localhost softwares]# ll
total 291924
-rwxr-xr-x. 1 root root 298927287 May 23 20:50 iidraccess-11.4.0.4-11086-linux-x86-setup.bin

2.3 执行安装如果使用默认安装目录,可以切换cdcadmin用户执行安装,选择语言,先English。
[root@localhost softwares]# su cdcadmin
[cdcadmin@localhost softwares]$ ll
total 291924
-rwxr-xr-x. 1 root root 298927287 May 23 20:50 iidraccess-11.4.0.4-11086-linux-x86-setup.bin
[cdcadmin@localhost softwares]$ ./iidraccess-11.4.0.4-11086-linux-x86-setup.bin
Preparing to install
Extracting the JRE from the installer archive...
Unpacking the JRE...
Extracting the installation resources from the installer archive...
Configuring the installer for this systems environment...

Launching installer...

===============================================================================
Choose Locale...
----------------

1- Deutsch
-> 2- English
3- Espa?ol
4- Italiano
5- Português(Brasil)

CHOOSE LOCALE BY NUMBER: 2

输入回车,继续下一步。
===============================================================================
IBM InfoSphere Data Replication Access Server(created with InstallAnywhere)
-------------------------------------------------------------------------------

Preparing CONSOLE Mode Installation...




===============================================================================
Introduction
------------

InstallAnywhere will guide you through the installation of IBM InfoSphere Data
Replication Access Server.

It is strongly recommended that you quit all programs before continuing with
this installation.

Respond to each prompt to proceed to the next step in the installation.If
you want to change something on a previous step, type back.

You may cancel this installation at any time by typing quit.

PRESS TO CONTINUE:

选择安装目录,默认就可以了,输入回车继续下一步。
===============================================================================
Choose Install Folder
---------------------

Where would you like to install?

Default Install Folder: /opt/IBM/InfoSphereDataReplication/AccessServer

ENTER AN ABSOLUTE PATH, OR PRESS TO ACCEPT THE DEFAULT
:

软件许可,输入1,输入回车继续下一步。
===============================================================================




LICENSE INFORMATION

The Programs listed below are licensed under the following License
Information terms and conditions in addition to the Program license
terms previously agreed to by Client and IBM. If Client does not have
previously agreed to license terms in effect for the Program, the
International Program License Agreement (Z125-3301-14) applies.

Program Name (Program Number):
IBM InfoSphere Data Replication Management Console / Access Server v11.
4.0.4 (Tool)

The following standard terms apply to Licensees use of the Program.

Limited use right

With the exception of Bundled Programs, all IBM software provided to
Licensee with the Program can only be used to support Licensees use
of the Principal Program under this License Information document,

Press Enter to continue viewing the license agreement, or enter "1" to
accept the agreement, "2" to decline it, "3" to print it, or "99" to go back
to the previous screen.: 1

LDAP配置(不知道是啥来的),默认回车继续下一步。
===============================================================================
Enable LDAP Configuration
-------------------------

Enable and select an LDAP configuration.
-> 1- None (Standard Mode)
2- LDAP Authentication Only
3- LDAP Authentication & Authorization
4- LDAP CHCCLP Embedded

CHOOSE LDAP CONFIGURATION BY NUMBER, OR PRESS TO ACCEPT THE DEFAULT
:

配置Access Server的端口,默认10101,回车继续下一步。
===============================================================================


Enter the TCP/IP port for Access Server.
Port Number: (Default: 10101):

配置用户数据目录,默认,回车继续下一步。
===============================================================================
Configure User Data Folder
--------------------------

Access Server requires a folder to store logs, configuration information and
user data. Specify a folder where this information should be stored.


Where would you like your user data folder?

Default User Data Folder: /opt/IBM/InfoSphereDataReplication/AccessServer


ENTER AN ABSOLUTE PATH, OR PRESS TO ACCEPT THE DEFAULT:

显示安装信息,回车继续下一步。
===============================================================================
Pre-Installation Summary
------------------------

Please Review the Following Before Continuing:

Product Name:
IBM InfoSphere Data Replication Access Server

Install Folder:
/opt/IBM/InfoSphereDataReplication/AccessServer

Link Folder:
/home/cdcadmin

User Data Folder:
/opt/IBM/InfoSphereDataReplication/AccessServer

Disk Space Information (for Installation Target):
Required:450,975,555 Bytes
Available: 15,706,402,816 Bytes

PRESS TO CONTINUE:

安装完成,注意提示是需要建立AS的用户账号的。
===============================================================================
Installation Complete
---------------------

Congratulations. IBM InfoSphere Data Replication Access Server has been
successfully installed to:

/opt/IBM/InfoSphereDataReplication/AccessServer

Before you connect to this Access Server installation, you must start Access
Server and create the administration user account. See the installation guide
for more information. You should also install the equivalent version of IBM
InfoSphere Data Replication Management Console, if you havent already done
so, before connecting to Access Server.


PRESS TO EXIT THE INSTALLER:

至此,AS的安装完成。
2.4 建立管理员账号进入至AS的安装目录下的bin/目录,使用nohup的方式启动AS。
[cdcadmin@localhost bin]$ pwd
/opt/IBM/InfoSphereDataReplication/AccessServer/bin
[cdcadmin@localhost bin]$ nohup ./dmaccessserver &
[1] 31437
[cdcadmin@localhost bin]$ nohup: ignoring input and appending output to ‘nohup.out’

再执行以下创建管理账号的命令,创建管理员账号,使用dmlistusers命令可以查看当前AS的全部账号信息,上述命令的详细用法可参考cdc help文档。
[cdcadmin@localhost bin]$ ./dmcreateuser cdcadmin cdcadminstrator system_administrator abcd1234 SYSADMIN TRUE FALSE TRUE
[cdcadmin@localhost bin]$ ./dmlistusers
UserRoleManagerDisabledLockedPwdChange Expires
----------------- --------- ---------- --------- --------- --------- ---------
cdcadminSYSADMINtruefalsefalsefalsefalse

3 安装IIDR(DB2)
3.1 安装DB2 Client由于CDC引擎需要与DB2进行连接,故使用db2 client的方式添加远程DB2连接,在此,先要安装DB2 Client,至于DB2 Client的安装过程不在此规范中说明。
DB2 client的实例目录为:/db2data/inst01/userhome,实例及实例用户均为inst01。
3.2 规划CDC引擎的安装目录与DB2实例主目录一致(建议),CDC引擎建立在db2 client实例目录内,故新建以下两个CDC目录:
  • 安装目录:/db2data/inst01/cdchome
  • 刷新目录:/db2data/inst10/cdcfresh 
上述两目录使用chown命令赋予db2 client实例用户权限:
[root@localhost inst01]# chown inst01:db2iadm cdchome/
[root@localhost inst01]# chown inst01:db2iadm cdcfresh/
[root@localhost inst01]# ls -l
total 0
drwxr-xr-x. 2 inst01 db2iadm6 May 24 19:31 cdcfresh
drwxr-xr-x. 2 inst01 db2iadm6 May 24 19:31 cdchome
drwx------. 2 fenc01 db2fadm62 May 24 19:25 fenchome
drwxr-xr-x. 7 inst01 db2iadm 168 May 24 19:31 userhome

3.3 执行安装使用root用户对cdc引擎的安装文件赋予可执行权限。
[root@localhost softwares]# chmod +x setup-iidr-11.4.0.4-5629-linux-x86.bin
[root@localhost softwares]# ll
total 983080
drwxr-xr-x. 3 root root166 May 24 19:22 client
-rwxr-xr-x. 1 root root 369709193 May 24 19:34 setup-iidr-11.4.0.4-5629-linux-x86.bin
-rw-r--r--. 1 root root 636958085 May 24 18:57 v11.5.5fp1_linuxx64_client.tar.gz

切换db2实例用户(也即是cdc引擎的用户),执行安装命令:
[root@localhost softwares]# su inst01
[inst01@localhost softwares]$ ./setup-iidr-11.4.0.4-5629-linux-x86.bin
Preparing to install
Extracting the JRE from the installer archive...
Unpacking the JRE...
Extracting the installation resources from the installer archive...
Configuring the installer for this systems environment...

Launching installer...

选择English作为安装语言:
===============================================================================
Choose Locale...
----------------

1- Deutsch
-> 2- English
3- Espa?ol
4- Italiano
5- Português(Brasil)

CHOOSE LOCALE BY NUMBER: 2

选择安装还是升级IIDR,此处选择新安装,或保持默认选项并继续下一步:
===============================================================================


Introduction
InstallAnywhere will guide you through the installation of IBM InfoSphere Data
Replication 11.4.0.4

Respond to each prompt to proceed to the next step in the installation.If
you want to change something on a previous step, type back.

You may cancel this installation at any time by typing quit.
-> 1- Install new product
2- Upgrade existing product

ENTER THE NUMBER FOR YOUR CHOICE, OR PRESS TO ACCEPT THE DEFAULT::

【IBM CDC系列CDC的安装】选择DB的类型为DB2,继续下一步:
===============================================================================


Select Datastore Type
-> 1- IBM Db2 for z/OS
2- Kafka
3- IBM DB2
4- IBM InfoSphere DataStage (including Apache Hadoop, WebHDFS, Cloudant)
5- FlexRep
6- IBM Informix Dynamic Server
7- IBM Netezza
8

    推荐阅读