Ophidia Analytics platform installation and setup from sources

This page describes the steps required to install the Ophidia components. The procedure can be applied, if not differently stated, on CentOS6, CentOS7 and Ubuntu 14. Before proceeding with the following steps, check that you have all the pre-requisites installed.

Common steps

As root run:

mkdir /var/www/html/ophidia
chown ophidia:ophidia /var/www/html/ophidia

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

mkdir -p /usr/local/ophidia/src

Ophidia Primitives Installation

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: 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

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

On CentOS6 or CentOS7

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

While on Ubuntu 14

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

For additional information regarding the component installation see: Ophidia Primitives.

Ophidia IO Server installation

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

git clone https://github.com/OphidiaBigData/ophidia-io-server

Install the required dependencies: for example on CentOS

sudo yum install bison\* flex\*

on Ubuntu

sudo apt-get install bison flex libfl-dev libfl-dev libbison-dev

Build and install Ophidia IO Server

On CentOS6 or Ubuntu 14

cd /usr/local/ophidia/src/ophidia-io-server
./bootstrap
./configure --prefix=/usr/local/ophidia/oph-cluster/oph-io-server  --with-netcdf-path=/usr/local/ophidia/extra
make
make install

While on CentOS7

cd /usr/local/ophidia/src/ophidia-io-server
./bootstrap
./configure --prefix=/usr/local/ophidia/oph-cluster/oph-io-server --with-netcdf-path=/usr/lib64/mpich
make
make install

Then, if not already available, create the following folders

mkdir -p /usr/local/ophidia/oph-cluster/oph-io-server/data1/var
mkdir -p /usr/local/ophidia/oph-cluster/oph-io-server/data1/log

If you need to change the default configuration file oph_ioserver.conf, see the Ophidia IO Server configuration page for more details.

Start the Ophidia IO Server:

su - ophidia
/usr/local/ophidia/oph-cluster/oph-io-server/bin/oph_io_server -i 1 > /dev/null 2>&1 &

For additional information regarding the component installation see: Ophidia IO Server.

Ophidia Analytics Framework Installation

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

git clone https://github.com/OphidiaBigData/ophidia-analytics-framework

Install the required dependencies: for example on CentOS

sudo yum install jansson\* libxml2\* openssl-devel mpich\* gsl gsl-devel

on Ubuntu

sudo apt-get install libjansson-dev libxml2 libxml2-dev libssl-dev mpich libmpich2-dev  gsl libgsl0-dev

Build and install Ophidia Analytics Framework

On CentOS6 or Ubuntu 14

cd /usr/local/ophidia/src/ophidia-analytics-framework
./bootstrap
./configure --prefix=/usr/local/ophidia/oph-cluster/oph-analytics-framework --enable-parallel-netcdf --with-netcdf-path=/usr/local/ophidia/extra/ --with-web-server-path=/var/www/html/ophidia --with-web-server-url=http://127.0.0.1/ophidia
make
make install

While on CentOS7

cd /usr/local/ophidia/src/ophidia-analytics-framework
./bootstrap
./configure --prefix=/usr/local/ophidia/oph-cluster/oph-analytics-framework --enable-parallel-netcdf --with-netcdf-path=/usr/lib64/mpich --with-web-server-path=/var/www/html/ophidia --with-web-server-url=http://127.0.0.1/ophidia
make
make install

Note

In case of Ophidia native IO server support, append the following configuration parameter to arguments of command configure:

--with-ophidiaio-server-path=/usr/local/ophidia/oph-cluster/oph-io-server/

Then, if not already available, create the following folder

mkdir -p /usr/local/ophidia/oph-cluster/oph-analytics-framework/log

Modify the oph_configuration file, specifically you may want to change the username and password value accordingly to your mysql configuration. See the Ophidia Analytics Framework configuration page for more details.

/usr/local/ophidia/oph-cluster/oph-analytics-framework/etc/oph_configuration

For additional information regarding the component installation see: Ophidia Analytics Framework.

OphidiaDB Configuration

Create the ophidiadb and the oph_dimensions databases in the MySQL environment:

mysql> create database ophidiadb;
mysql> create database oph_dimensions;

Load the ophidiadb schema and default parameters:

mysql -u root -p ophidiadb < /usr/local/ophidia/oph-cluster/oph-analytics-framework/etc/ophidiadb.sql

In order to properly configure the ophidiadb installation, launch the following query:

mysql > use ophidiadb;
mysql > INSERT INTO host (hostname, cores, memory) VALUES ('127.0.0.1',1,1);

changing the cores and the memory value accordingly with your host resources;

mysql > INSERT INTO dbmsinstance (idhost, login, password, port) VALUES (1, 'root', '<password>', 3306);

changing the password

mysql > INSERT INTO hostpartition (partitionname) VALUES ('test');
mysql > INSERT INTO hashost (idhostpartition, idhost) VALUES (1,1);

Note

In case of Ophidia native IO server support, add also an Ophidia IO Server instance:

mysql > INSERT INTO dbmsinstance (idhost, login, password, port, ioservertype) VALUES (1, 'root', '<password>', 65000, 'ophidiaio_memory');

Ophidia Server Installation

Ophidia Server requires gSOAP. You can download and install gSOAP 2.8.27 from http://sourceforge.net/projects/gsoap2/files/gSOAP/

unzip gsoap-2.8.27.zip
cd gsoap-2.8
./configure --prefix=/usr/local/ophidia/extra
make
make install

In order to activate OpenId Connect interface the library CJOSE (C library implementing the Javascript Object Signing and Encryption) has to be downloaded and installed from cjose as follows. Version 0.4.1 has been tested.

tar -xzf cjose-0.4.1.tar.gz
cd cjose-0.4.1
./configure --prefix=/usr/local/ophidia/extra
make
make install

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

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

Install the required dependencies: for example on CentOS

sudo yum install openssl-devel curl libcurl-devel libxml2\* jansson\* libssh2\*

on Ubuntu

sudo apt-get install libssl-dev curl libcurl3 libcurl4-openssl-dev libxml2 libxml2-dev libjansson-dev libssh2-1-dev

Build and install Ophidia Server

cd /usr/local/ophidia/src/ophidia-server
./bootstrap
./configure --prefix=/usr/local/ophidia/oph-server --with-framework-path=/usr/local/ophidia/oph-cluster/oph-analytics-framework --with-soapcpp2-path=/usr/local/ophidia/extra --enable-webaccess --with-web-server-path=/var/www/html/ophidia --with-web-server-url=http://127.0.0.1/ophidia --with-matheval-path=/usr/local/ophidia/extra/lib
make
make install

There are several configuration options that can be enabled/disabled by using the related parameters of command configure. For instance, the options --with-ws-hostname and --with-ws-port should be set to DNS name of the node which the server will be running on and to server port number (11732 by default). If hostname is localhost, use the following parameters:

--with-web-server-url=http://localhost/ophidia
--with-ws-hostname=localhost
--with-ws-port=11732

Use option --with-cjose-path to enable OpenId Connect interface as follows:

--with-cjose-path=/usr/local/ophidia/extra

In case libssh has to be adopted, set the option --enable-ssh-lib. This feature is deprecated.

Create the server certificates (see Ophidia Server configuration) and copy them in /usr/local/ophidia/oph-server/etc/cert:

cp cacert.pem myserver.pem  /usr/local/ophidia/oph-server/etc/cert

Copy the authorization files:

cp -r /usr/local/ophidia/src/ophidia-server/authz /usr/local/ophidia/oph-server/

If necessary, you can update the users available and set the permissions. By default, two users are defined: admin and oph-test (see User Management to add new users). You can configure their features and permissions setting the files: users.dat (for changing the password) and users/<user_name>/user.dat (for extra features) in /usr/local/ophidia/oph-server/authz. Specifically you may want to modify the OPH_MAX_CORES values accordingly to your host resources.

Modify the ophidiadb.conf file accordingly to your host configuration; specifically you need to change the password parameter.

/usr/local/ophidia/oph-server/etc/ophidiadb.conf

Then, if not already available, create the following folders

mkdir -p /usr/local/ophidia/oph-server/log
mkdir -p /usr/local/ophidia/oph-server/authz/sessions
mkdir -p /var/www/html/ophidia/sessions

To start the server run

/usr/local/ophidia/oph-server/bin/oph_server 2>&1 > /dev/null < /dev/null &

For additional information regarding the component installation and startup see: Ophidia Server.

Ophidia Terminal Installation

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

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

Install the required dependencies: for example on CentOS

sudo yum install graphviz\* gtk2\* jansson\* libxml2\* openssl-devel curl libcurl-devel policycoreutils-python readline\*

on Ubuntu

sudo apt-get install graphviz-dev libgtk2.0-dev libjansson-dev libxml2 libxml2-dev libssl-dev curl libcurl3 libcurl4-openssl-dev libreadline-dev

Build and install Ophidia Terminal:

cd /usr/local/ophidia/src/ophidia-terminal
./bootstrap
./configure --prefix=/usr/local/ophidia/oph-terminal
make
make install

Start the Ophidia terminal:

/usr/local/ophidia/oph-terminal/bin/oph_term -H 127.0.0.1 -u oph-test -p abcd -P 11732

For additional information regarding the component installation see: Ophidia Terminal.

Test the correctness of the entire installation launching a simple command:

oph_list level=2

Enjoy!