This topic describes how to install OceanBase Connector/C. Before the installation, make sure that the prerequisites are met.
Prerequisites
Before you install OceanBase Connector/C, make sure that you have set up the basic database development environment that meets the following requirements:
The GNU Compiler Collection (GCC) version is 3.4.6 or later. Version 4.8.5 is recommended.
The CMake version is 2.8.12 or later.
Contact OceanBase Technical Support to obtain the installation package of OceanBase Connector/C, also known as
LibOBClient.
Installation on Linux
Install
LibOBClient.sudo rpm -ivh libobclient-xx.x86_64.rpmInstall
OBClient.sudo rpm -ivh obclient-xx.x86_64.rpmNote
OBClientdepends onLibOBClient. Therefore, installLibOBClientfirst.
Compilation from the source code
The GitHub repository of OceanBase Connector/C provides the latest development version of the source code.
Install dependent tools.
sudo yum install -y git cmake gcc make openssl-devel ncurses-devel rpm-build gcc-c++ bison bison-devel zlib-devel gnutls-devel libxml2-devel openssl-devel \ libevent-devel libaio-develDownload the source code of
OBClient.cd rpmExecute the compilation script and download the code of
LibOBClient.sh build.sh # Compilation code cd libmariadb/rpm # Go to the package directory of LibOBClient.Build the RPM installation packages of
LibOBClientandOBClient.sh libobclient-build.sh # Build the installation package of LibOBClient. cd ../../rpm # Go to the package directory of OBClient. sh obclient-build.sh # Build the installation package of OBClient.Install
LibOBClient.sudo rpm -ivh libobclient-xx.x86_64.rpmInstall
OBClient.sudo rpm -ivh obclient-xx.x86_64.rpmNote
OBClientdepends onLibOBClient. Therefore, installLibOBClientfirst.