This topic describes how to install OceanBase Change Data Capture (obcdc) for the binlog service to adapt to a new OceanBase Database version.
Background information
The release cycle of obbinlog is different from that of OceanBase Database. If a new OceanBase Database version is released but no corresponding new obbinlog version is released, you can install obcdc of the corresponding version for the binlog service to adapt to the new OceanBase Database version.
Prerequisites
You have installed obbinlog.
Procedure
Note
This section describes how to install obcdc V4.2.5 in an x86-based CentOS Linux 7.9 image. The procedure may differ for other environments.
Download the installation package of obcdc.
Visit OceanBase Download Center and download the obcdc installation package of the required version based on the actual environment. Alternatively, visit the website of open-source images of Alibaba Cloud, go to the corresponding download page based on the actual environment, search for
oceanbase-ce-cdc, and then download the installation package of the required version.Decompress the RPM package.
[admin@test001 rpm]$ rpm2cpio oceanbase-ce-cdc-4.2.5.0-100010012024110110.el7.x86_64.rpm | cpio -divAfter the decompression, the following files appear in the
./home/admin/oceanbase/lib64directory:libobcdc.so -> libobcdc.so.4 libobcdc.so.4 -> libobcdc.so.4.2.5.0 libobcdc.so.4.2.5.0Move the files to the corresponding directory of obbinlog.
Notice
In the
obcdcfolder under the installation directory of obbinlog, subfolders are named in the format ofobcdc-ce-<version>.x-access, where<version>represents the first three digits of the version number, for example,obcdc-ce-4.2.5.x-access.[admin@test001 rpm]$ sudo mv ./home/admin/oceanbase/lib64 /home/ds/oblogproxy/obcdc/obcdc-ce-4.2.5.x-accessIn this example,
/home/ds/oblogproxy/is the default installation path of obbinlog. You need to replace it with the actual installation path.Configure other required dependencies.
Copy other required dependencies from other directories to the new obcdc directory.
[admin@test001 obcdc]$ cp -av obcdc-ce-4.2.4.x-access/libaio* obcdc-ce-4.2.5.x-access [admin@test001 obcdc]$ cp obcdc-ce-4.2.4.x-access/libobcdcaccess.so obcdc-ce-4.2.5.x-accessStart the binlog server.
If the binlog server has never been started on the current node, start it based on Step 2 in the Deployment guide topic.
If the binlog server has already been started on the current node, you need to restart the binlog server for obcdc to take effect. The restart method varies based on the startup method and the value of the
supervise_startparameter.Restart by using supervisord
In a scenario where the binlog server is started by using the
env/deploy.shdeployment script andsupervise_startis set totrue, the script will install supervisord and use it to start the program. In this case, you can run the following command to restart the binlog server:[admin@test001 oblogproxy]$ supervisorctl restart binlogRestart without using supervisord
In other scenarios, you can run the following commands to restart the binlog server:
[admin@test001 oblogproxy]$ sudo ./run.sh stop [admin@test001 oblogproxy]$ sudo ./run.sh start