This guide was tested on Alibaba Cloud Linux 3.2104 LTS 64 bit.
Install required packages.
sudo yum config-manager --set-enabled powertools
sudo yum install -y liburing-devel
sudo yum install -y openssl-devel \
ncurses-devel \
libtirpc-devel \
rpcgen \
bison \
libudev-devel
# ubuntu/debian
sudo apt install -y g++-12 gcc-12 perl libaio-dev liburing-dev bison flex byacc libudev-dev libtirpc-dev libldap-dev libcurlpp-dev libcurl4-openssl-dev pkgconf libpkgconf-dev zlib1g-dev libgrpc-dev doxygen libsasl2-dev libsnappy-dev libnfs-dev make cmake git libncurses-dev
cd /path/to/topling # you should create this dir
git clone https://github.com/topling/toplingdb.git
cd toplingdb
git submodule update --init --recursive
make -j`nproc` DEBUG_LEVEL=0 shared_lib
sudo make install-shared \
PREFIX=/path/to/install/dir \
LIBDIR=/path/to/install/dir/lib64
PREFIX
and LIBDIR
are optional for make install-shared
:
PREFIX |
default: /usr/local |
---|---|
LIBDIR |
default: ${PREFIX}/lib |
Now we have compiled ToplingDB and topling-zip, MyTopling requires these two on compiling and running.
Please make sure repository toplingdb and mytopling are cloned to same parent dir(/path/to/topling).
include dirs are auto added in mytopling build.sh
.
/path/to/toplingdb
/path/to/toplingdb/include
/path/to/toplingdb/sideplugin/rockside/src
/path/to/toplingdb/sideplugin/topling-zip/src
You should have installed ToplingDB libs to LIBDIR
above.
cd /path/to/topling
git clone https://github.com/topling/mytopling.git
cd mytopling
git submodule update --init --recursive
export CXX=g++ # optional, for example you want to use clang++ or other CXX
export CC=gcc # optional, for example you want to use clang or other CC
export CXX_HOME=/usr # optional, if you want to use an alternative CXX
bash build.sh -DTOPLING_LIB_DIR=/path/to/LIBDIR \
-DCMAKE_INSTALL_PREFIX=/path/to/mytopling/install/dir
MyTopling requires some libs generated by in compiling MyTopling, so we need to add such lib dirs to LD_LIBRARY_PATH
.
cd build-rls
export LD_LIBRARY_PATH=`pwd`/lib:`pwd`/lib/plugin:plugin_output_directory
make -j`nproc`
sudo make install
Now you can run MyTopling Server: start_mysqld.sh
To explore more feature of MyTopling Server, read and modify mytopling.json.
Reference: ToplingDB SidePlugin Manual