Installation guide

2023-07-26 02:37:19  Updated

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

  1. Install LibOBClient.

    sudo rpm -ivh libobclient-xx.x86_64.rpm
    
  2. Install OBClient.

    sudo rpm -ivh obclient-xx.x86_64.rpm
    

    Note

    OBClient depends on LibOBClient. Therefore, install LibOBClient first.

Compilation from the source code

The GitHub repository of OceanBase Connector/C provides the latest development version of the source code.

  1. 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-devel
    
  2. Download the source code of OBClient.

    cd rpm
    
  3. Execute the compilation script and download the code of LibOBClient.

    sh build.sh   # Compilation code 
    cd libmariadb/rpm   # Go to the package directory of LibOBClient.
    
  4. Build the RPM installation packages of LibOBClient and OBClient.

    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.
    
  5. Install LibOBClient.

    sudo rpm -ivh libobclient-xx.x86_64.rpm
    
  6. Install OBClient.

    sudo rpm -ivh obclient-xx.x86_64.rpm
    

    Note

    OBClient depends on LibOBClient. Therefore, install LibOBClient first.

Contact Us