Ophidia Analytics platform installation and setup from RPMs

This page present the procedure to install the various Ophidia packages on CentOS7 from RPMs.

First download the needed RPM packages from https://download.ophidia.cmcc.it/rpm/1.2/.

  • ophidia-terminal
  • ophidia-primitives
  • ophidia-analytics-framework
  • ophidia-server
  • ophidia-io-server

Ophidia Primitives Installation

Install the ophidia-primitives package.

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

Copy the Ophidia primitives into MySQL server plugin directory and load them into the MySQL environment

sudo 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

Change owner of the installation folders

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

Ophidia IO Server Installation

Install the ophidia-io-server package

sudo yum install ophidia-io-server-1.2*.x86_64.rpm

Change owner of the installation folders

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

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 as Ophidia user:

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

Ophidia Analytics Framework Installation

Install the analytics framework package.

sudo yum install ophidia-analytics-framework-1.2*.x86_64.rpm

Change owner of the installation folders

sudo chown -R ophidia:ophidia /usr/local/ophidia
sudo chown -R ophidia:ophidia /var/www/html/ophidia

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

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 the library CJOSE (C library implementing the Javascript Object Signing and Encryption). Download and install cjose. 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

Install the server package.

sudo yum install ophidia-server-1.2*.x86_64.rpm

Change owner of the installation folders

sudo chown -R ophidia:ophidia /usr/local/ophidia
sudo chown -R ophidia:ophidia /var/www/html/ophidia

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

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.

Then 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

If necessary, set appropriately the parameters listed in /var/www/html/ophidia/env.php to enable web access (see Session Management for further details). The following configuration should be correct in case DNS name of the node which the server will be running on is localhost.

$oph_auth_location = '/usr/local/ophidia/oph-server';
$oph_web_server = 'http://localhost/ophidia';
$oph_web_server_location = '/var/www/html/ophidia';
$oph_ws_protocol = 'https';
$oph_ws_host = 'localhost';
$oph_ws_port = '11732';
$oph_notifier = 'framework';

If not exists, create the Ophidia server log file:

touch /usr/local/ophidia/oph-server/log/server.log

Start the Ophidia server as Ophidia user:

su - ophidia
/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

Install the terminal package.

yum install ophidia-terminal-1.2*.x86_64.rpm

Change owner of the installation folders

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

As ophidia user start the Ophidia terminal:

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

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

oph_list level=2

Enjoy!