Prerequisites
Environment requirements
Hardware: x86_64, aarch64
Operating system: CentOS/Red Hat Linux Release 7.2
Compiler: GCC 4.8
Preparations
OceanBase Database: V2.2.76 or later (It is recommended to use OceanBase Database V4.0 or later to experience the full features of the current version).
ODP (OBProxy): V4.0 or later is recommended.
libobclient: V2.1.1 or later.
Install the Oracle-related driver files (oracle-instantclient), as Oracle header files are required starting from OBCI V2.0.4.
OBCI must be installed, and the GCC compiler must be deployed in advance.
Note
We recommend that you use the latest versions of OBServer and OBProxy to fully support the new features of this version.
Installation instructions
OBCI is distributed as an RPM package. The OBCI software package includes the OCI runtime library libobci, its header files, static libraries, and a sample program.
After obtaining the RPM package, run the following command with root privileges in the command-line tool to install it:
rpm -ivh obci-<version>.x86_64.rpm
By default, the programs and files included in the package will be installed to the following paths:
Header files: Installed under
/u01/obclient/include.Library files: Installed under
/u01/obclient/lib.
Note
When using V2.0.4 or later, the RPM package does not include the /u01/obclient/include folder. Instead, Oracle header files (such as /usr/include/oracle/11.2/client64/) are required.
Usage instructions
OBCI provided by OceanBase is a C language call interface compatible with Oracle OCI, offering full feature compatibility with OCI.
Therefore, when using Oracle OCI to write C language applications, you do not need to modify any lines of application source code. You only need to specify the runtime library as the OBCI library during linking. The library files are installed by default under /u01/obclient/lib.
Note
If dynamically linking to libobci.so, you also need to manually install the OBClient RPM package. If statically linking to libobci.a, you do not need to install the OBClient RPM package.
For specific linking methods, refer to Basic development procedure.