Ophidia Primitives Installation

This page presents the procedure to install, setup and test the Ophidia Primitives from sources and binary packages.

Note

Before proceeding with the following steps, check that you have the required pre-requisites installed. In particular system development libraries, as well as MySQL server and MySQL devel libraries are required.

Preliminary dependencies

GNU Matheval

GNU Matheval is required for certain Ophidia primitives. If not already available, build and setup GNU libmatheval.

on CentOS7

sudo yum install compat-guile18 compat-guile18-devel flex-devel guile-devel guile bison

Then download libmatheval-1.1.11 from http://ftp.gnu.org/gnu/libmatheval/ and install it in the path /usr/local/ophidia/extra running the following commands:

tar -xzf libmatheval-1.1.11.tar.gz
cd libmatheval-1.1.11
./configure --prefix=/usr/local/ophidia/extra
make
sudo make install

on Ubuntu 18

sudo apt-get install guile-2.0-dev libfl-dev flex bison libmatheval-dev libmatheval1

Install the primitives

Installation from sources

Installation from source can be used on most Linux distros (i.e. CentOS6, CentOS7, Ubuntu 14, Ubuntu 18).

As ophidia user create a folder to download and build Ophidia source code.

mkdir /usr/local/ophidia/src

Download Ophidia Primitives release from https://github.com/OphidiaBigData/ophidia-primitives/releases. Alternatively you can get the latest development version from the git repository:

git clone https://github.com/OphidiaBigData/ophidia-primitives

Install the required dependencies:

  • gsl and related devel libraries

On CentOS

sudo yum install gsl gsl-devel

on Ubuntu

sudo apt-get install gsl-bin libgsl23 libgsl-dev

Build and install Ophidia Primitives.

cd /usr/local/ophidia/src/ophidia-primitives
./bootstrap
./configure --prefix=/usr/local/ophidia/oph-cluster/oph-primitives --with-matheval-path=/usr/local/ophidia/extra/lib
make
make install

Note

On Ubuntu 18 you should use the proper path for libmathevel

./configure --prefix=/usr/local/ophidia/oph-cluster/oph-primitives --with-matheval-path=/usr/lib/x86_64-linux-gnu

Installation from RPM

To install the Ophidia Primitives package on CentOS7 download the ophidia-primitives rpm from https://download.ophidia.cmcc.it/rpm/1.5/ and run

sudo yum install ophidia-primitives-1.5*.x86_64.rpm

Change owner of the installation folders

sudo chown -R ophidia:ophidia /usr/local/ophidia

Installation from DEB

To install the Ophidia Primitives package on Ubuntu 18 download the ophidia-primitives deb from https://download.ophidia.cmcc.it/deb/1.5/ and run

sudo dpkg -i ophidia-primitives_1.5*_amd64.deb

Change owner of the installation folders

sudo chown -R ophidia:ophidia /usr/local/ophidia

Finalize the setup

Copy the Ophidia primitives into MySQL server plugin dir and load them into the MySQL environment. As root run:

On CentOS

cp /usr/local/ophidia/oph-cluster/oph-primitives/lib/liboph_*.so /usr/lib64/mysql/plugin
mysql -u root -p mysql < /usr/local/ophidia/oph-cluster/oph-primitives/etc/create_func.sql

On Ubuntu

cp /usr/local/ophidia/oph-cluster/oph-primitives/lib/liboph_*.so /usr/lib/mysql/plugin
mysql -u root -p mysql < /usr/local/ophidia/oph-cluster/oph-primitives/etc/create_func.sql