Ophidia Primitives Installation

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

Install GNU libmatheval

If not already installed, build and install libmatheval, first install dependencies:

on CentOS6

sudo yum install guile-devel guile flex-devel bison

on CentOS7

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

on Ubuntu 14

sudo apt-get install guile-1.8-dev libfl-dev flex bison

Then download libmatheval-1.1.10 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.10.tar.gz
cd libmatheval-1.1.10
./configure --prefix=/usr/local/ophidia/extra
make
sudo make install

Installation from sources

Installation from source can be used on most Linux distros (i.e. CentOS6, CentOS7 and Ubuntu 14). Before proceeding with the following steps, check that you have all the pre-requisites installed. In particular MySQL server and MySQL devel libraries are required.

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

For example on CentOS

sudo yum install gsl gsl-devel

on Ubuntu

sudo apt-get install gsl-bin libgsl0ldbl libgsl0-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

Installation from RPM

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

sudo yum install ophidia-primitives-1.3*.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 14 download the ophidia-primitives deb from https://download.ophidia.cmcc.it/deb/1.3/ and run

sudo dpkg -i ophidia-primitives_1.3*_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