This page presents the procedure to install, setup and test the Ophidia Server from sources and binary packages.
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.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
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, MySQL devel libraries and Apache Web server are required.
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 /usr/local/ophidia/src
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
Ophidia Server requires also 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
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
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 --with-cjose-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
Note
In case libssh has to adopted, set the option --enable-ssh-lib
.
Copy authorization files:
cp -r /usr/local/ophidia/src/ophidia-server/authz /usr/local/ophidia/oph-server/
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
Note
In case of GSI support, install the prerequisites append the following configuration parameters to arguments of command configure:
--with-interface-type=gsi --with-globus-include=/usr/include/globus --with-globus-libs=/usr/lib64 --enable-voms --with-voms-include=/usr/include/voms --with-voms-libs=/usr/lib64
For GSI support, install host certificates (public key hostcert.pem and private key hostkey.pem) in /etc/grid-security and assign it the appropriate access privileges
chmod 644 /etc/grid-security/hostcert.pem
chmod 400 /etc/grid-security/hostkey.pem
Assure hostname is correctly set to the name stored into the certificate.
Append the Distinguished Name (DN) associated with the host certificate to the list of authorized DNs in /usr/local/ophidia/oph-server/authz/dn.dat, assigning it the privilege “write”. Create the text file “dn.dat” if it does not exist. For instance, append a line as follows
/C=XX/O=XX/OU=Host/L=XX/CN=YY:write
where YY has to be the hostname. This DN can be used for internal notifications, so that it shall be set to
the parameter NOTIFIER in Ophidia Server configuration file
/usr/local/ophidia/oph-server/etc/server.conf
the parameter SOAP_USERNAME in Ophidia Analytics Framework configuration file
/usr/local/ophidia/oph-cluster/oph-analytics-framework/etc/oph_soap_configuration
Create a proxy for Ophidia Server before starting the server:
su - ophidia
voms-proxy-init
To install the Ophidia Server package on CentOS7 download the ophidia-server rpm from https://download.ophidia.cmcc.it/rpm/1.3/ and run
sudo yum install ophidia-server-1.3*.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
To install the Ophidia Server package on Ubuntu 14 download the ophidia-server deb from https://download.ophidia.cmcc.it/deb/1.3/ and run
sudo dpkg -i ophidia-server_1.3.*_amd64.deb
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 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 &
To avoid typing the whole executable path, you may add it to the PATH environmental variable with:
export PATH="/usr/local/ophidia/oph-server/bin:$PATH"
An interesting option of oph_server is -d used for debugging mode. When Ophidia server is started with this option (as follows), server log is more verbose and operator-specific logs are saved in folder TXT_DIR. This option is useful mainly for developers and should be enabled only for debugging as it introduces much overhead. See Ophidia Server configuration for additional information.
su - ophidia
/usr/local/ophidia/oph-server/bin/oph_server -d 2>&1 > /dev/null < /dev/null &
Note
If the Ophidia Server and the resource manager controller are running on different machines you need to enable password-less key-based SSH authentication and startup the server with the -m option. In this case the IP_TARGET_HOST and SUBM_USER configuration parameters should be setup accordingly. See Ophidia Server configuration for additional information.
su - ophidia
/usr/local/ophidia/oph-server/bin/oph_server -m 2>&1 > /dev/null < /dev/null &