Installing and Setting Up BI Server on Sintez-OS.WS

The page contains an example of installing and setting up BI server on Sintez-OS.WS.

NOTE. BI server functionality is limited by the set of available operations and their implementation.

In this article:

Preparation

Installing Qt Libraries

Setting Up Library Search Directories

Installing BI Server

Installing and Setting Up httpd Services to Work with BI Server

Setting Up BI Server

Preparation

Execute preparatory actions before BI server installation:

  1. Make sure that the operating system is set up and hardware and software requirements are met for correct installation and full-functional work of Foresight Analytics Platform web application.

  2. Set up DBMS back end.

  1. Create metadata repository by one of the following ways:

Before creating the repository, study the Installing Foresight Analytics Platform Desktop Application section.

After executing one of the operations, transfer repository and connection setting to production environment by DBMS means.

  1. Install DBMS front end:

Download Oracle client from the official website (the basic, devel, sqlplus packages in the RPM format are required).

Consider installation using the example of the Oracle 12.1 client. To do it, copy RPM packages and install them with the following command:

sudo yum localinstall oracle-instantclient*

After the installation add a path to the Oracle client libraries using the ldconfig utility to the list of dependent library search and update cache:

echo "/usr/lib/oracle/12.1/client64/lib" > ~/oracle.conf
sudo cp ~/oracle.conf /etc/ld.so.conf.d/
sudo ldconfig

After BI server is installed, it is required to add export of the TNS_ADMIN variable with specifying the directory containing the tnsnames.ora file to the /etc/opt/Foresight/fp9.2-biserver/envvars environment variables file for Apache2 instance. The Apache2 instance should have access to the file, the www-data:www-data owner can be set for the tnsnames.ora file.

For details about creating a repository database see the Preparing Oracle Server subsection.

To install PostgreSQL client from repository, execute the following command:

sudo yum install postgresql

Alternatively, Postgres Pro client can be installed. The installation guide is available at the manufacturer's site.

For details on creating a database for repository see the Preparing PostgreSQL Server subsection.

If BI server is installed manually from archive or DBMS front end is installed after BI server installation, the symbolic link is to be created:

sudo ln -s /usr/lib64/libpq.so.5 /usr/lib64/libpq.so

Setup is not required. Copy a file with repository database to the server, grant access permissions of BI server to the file and add an SQLite repository and specify the database file.

If a repository is based on Microsoft SQL Server DBMS, it can be worked via ODBC driver. For details see the Preparing ODBC Driver to Connect to Microsoft SQL Server article.

NOTE. The possible problems that can occur after installing DBMS front end on connecting to DBMS server, are given in the sections describing the solving of possible problems on installation, update and on working with Foresight Analytics Platform.

Installing Qt Libraries

Working with BI server in Foresight Analytics Platform requires installation of third-party packages that can be downloaded from the internet or from DVD repository if the internet is not available, or from ready RPM packages. If internet connection is provided via proxy server, determine settings required for connection.

The correct BI server performance requires an installed set of Qt libraries 4.8.x. The libraries can be installed by one of the methods:

Consider the example of a manual build of Qt 4.8.7 from source files and setup of Foresight Analytics Platform to use this build.

  1. Download an archive with source codes of Qt 4.8.7:

wget https://download.qt.io/official_releases/qt/4.8/4.8.7/qt-everywhere-opensource-src-4.8.7.tar.gz

  1. Install the required setup packages:

sudo yum install gcc-c++ libX11-devel libXext-devel libXtst-devel libGLU-devel libxcb libxcb-devel xcb-util xcb-util-devel perl-version

  1. Set the required dependent titles:

sudo yum install freetype-devel fontconfig-devel libmng-devel cups-devel dbus-devel libicu-devel glib2-devel libXrandr-devel libXv-devel libXrender-devel libXcursor-devel libXinerama-devel libpng-devel libtiff-devel libSM-devel mesa-libGL-devel libXi-devel

  1. Unpack the downloaded archive and go to the new directory:

tar zxf qt-everywhere-opensource-src-4.8.7.tar.gz

cd qt-everywhere-opensource-src-4.8.7

  1. Configuration and build (OpenGL, freetype2 are required; additional parameters of the Qt 4.8 build: http://doc.qt.io/qt-4.8/configure-options.html):

./configure -confirm-license -prefix /opt/Qt-4.8.7 -opensource -release -fast -xmlpatterns -no-multimedia -no-audio-backend -no-phonon -no-phonon-backend -svg -no-webkit -script -platform linux-g++-64 -system-zlib -system-libtiff -system-libpng -system-libjpeg -no-rpath -optimized-qmake -dbus-linked -reduce-relocations -verbose -no-gtkstyle -no-openvg -lfontconfig -I /usr/include/freetype2 -qvfb -icu -no-sql-ibase -no-sql-sqlite2 -no-sql-db2 -no-sql-oci -no-sql-tds -no-sql-odbc -no-sql-psql -no-sql-sqlite -no-sql-mysql -no-qt3support -opengl desktop -no-egl -cups -shared -largefile -no-separate-debug-info -sm -stl -system-libmng -xinput -xcursor -xfixes -xinerama -xshape -xrandr -xrender -xkb -glib -nomake examples -nomake tests -nomake docs -nomake demos

gmake -j4

sudo gmake install

NOTE. The specified configuration is an example and can be changed if required. If the message appears: "Tablet and Xinput support cannot be enabled due to functionality tests! Turn on verbose messaging (-v) to ./configure to see the final report. If you believe this message is in error you may use the continue switch (-continue) to ./configure to continue." - it is required to replace the -xinput build configuration flag with the -no-xinput flag.

The following items are optional and can be used if it is required to build Qt in other configuration or remove the earlier installed version.

  1. The following dependencies may be required on other assembly parameters:

sudo yum install mysql-devel unixODBC-devel postgresql-devel sqlite-devel pulseaudio-libs-devel alsa-lib-devel gtk2-devel

  1. Execute the commands to clear the build folder:

gmake confclean

gmake clean

  1. To delete the build, execute the command:

sudo gmake uninstall

If the build is running not at the BI server, Qt can be transferred to it by packing the archive to the directory /opt/Qt-4.8.7, and then unpacking it to the archive at the BI server to the same directory and adding the path to ldconfig libraries. The alternative option is to pack the archive to RPM by means of the "checkinstall" utility, but the path to ldconfig libraries must be added at the installation server.

Setting Up Library Search Directories

To add search directories for Qt and Foresight Analytics Platform follow the operations:

cd ~

echo > qt-x86_64.conf "/opt/Qt-4.8.7/lib"

sudo rm /etc/ld.so.conf.d/qt-x86_64.conf

sudo cp qt-x86_64.conf /etc/ld.so.conf.d/

sudo ldconfig

NOTE. If Qt was installed from the QtSdk-offline-linux-x86_64-v1.2.1.run package, replace the path to /opt/QtSDK/Desktop/Qt/4.8.1/gcc/lib.

Installing BI Server

To install BI server, execute the following operations:

  1. Copy a *.tar.gz archive with Foresight Analytics Platform BI server installation files to the home directory.

  1. Unpack the archive to the /opt/Foresight/9.2 directory by executing the following commands in the terminal:

sudo mkdir -p /opt/Foresight/9.2

cd /opt/Foresight/9.2
sudo tar xvfz ~/<archive name of Foresight Analytics Platform>.tar.gz

cd /opt/Foresight/9.2/bin

sudo chmod +x axis2_start.sh

NOTE. The axis2_start.sh script is required to check if system basic settings are correct and to debug; this script cannot be used for commercial purposes. Replace the string "export LD_LIBRARY_PATH=:/opt/Foresight/9.2/bin:/opt/Qt-4.8.7/lib:$LD_LIBRARY_PATH in the script and uncomment "export PPLOG=1".

  1. Install additional packages for BI server of Foresight Analytics Platform by executing the following commands in the terminal:

sudo yum install mesa-libGL mesa-libGLU libgomp libpng libjpeg
sudo yum install httpd
sudo yum install postgresql-server postgresql-contrib postgresql
sudo ln -s /usr/lib64/libpq.so.5 /usr/lib64/libpq.so
sudo yum install xorg-x11-server-Xvfb

After this install and set up httpd services.

Installing and Setting Up httpd Services to Work with BI Server

This article describes installing and setting up of httpd services for working with BI server on Sintez-OS.WS. It is recommended to set up virtual display xvfb before the installation.

To install and set up httpd services to work with BI server, execute the following operations:

  1. Add the following strings to the /etc/sysconfig/httpd file:

HTTPD=/usr/sbin/httpd.worker

## Foresight Analytics Platform

export WSFCPP_HOME=/opt/Foresight/R90/bin

export LD_LIBRARY_PATH=$WSFCPP_HOME:/opt/Qt-4.8.7/lib:$LD_LIBRARY_PATH

export TNS_ADMIN=$WSFCPP_HOME

# Uncomment line below to export extended log

#export PPLOG=1

export HTTPD_LANG=en_US.UTF-8

export DISPLAY=localhost:987

export LD_PRELOAD=/opt/Qt-4.8.7/lib/libQtGui.so.4

export LSFORCEHOST=NO-NET

NOTE. The specified example uses the Qt 4.8.7 version. If OS contains another version, correct the specified strings by specifying corresponding version of Qt. For example, if Qt is installed from QtSdk-offline-linux-x86_64-v1.2.1.run package, replace the path /opt/Qt-4.8.7/lib to /opt/QtSDK/Desktop/Qt/4.8.1/gcc/lib. Specify the number of the display server, on which graphics is rendered, in the DISPLAY environment variable. It is recommended to use the virtual display xvfb No. 987, but if the physical X server is used, specify its number DISPLAY=:0.0.

  1. Delete the <IfModule worker.c> tags with their contents in the file /etc/httpd/conf/httpd.conf. Add:

<IfModule worker.c>

   ServerLimit 1

   StartServers 1

   MaxClients 64

   MinSpareThreads 32

   MaxSpareThreads 64

   ThreadsPerChild 64

   MaxRequestsPerChild  0

</IfModule>

CoreDumpDirectory /tmp

## Foresight Analytics Platform

# Uncomment line below if use httpd 2.2

LoadModule axis2_module "/opt/Foresight/R90/bin/libmod_axis2_2_2.so"

# Uncomment line below if use htppd 2.4

#LoadModule axis2_module "/opt/Foresight/R90/bin/libmod_axis2_2_4.so"

Axis2RepoPath "/opt/Foresight/R90/bin"

Axis2LogFile "/opt/Foresight/R90/bin/logs/axis2.log"

Axis2LogLevel info

Axis2ServiceURLPrefix services

<Location /axis2>

   SetHandler axis2_module

</Location>

  1. Add httpd service autorun:

sudo chkconfig httpd on

  1. Disable SELinux in the /etc/sysconfig/selinux file, after that restart the computer:

SELINUX=disabled

NOTE. SELinux is disabled for illustrative purposes. The setup of security subsystem for working with Foresight Analytics Platform must be executed by the system administrator.

  1. Then set up xvfb. The graphics setup example is given in the Outputting Graphics via xvfb Virtual Display subsection.

  1. Restart the httpd service:

sudo service httpd restart

  1. Check performance of the BI server installed in httpd by the URL in the browser: http://localhost/axis2/services/. A page with the list of BI server operations should open (see the Checking BI Server Performance section).

Setting Up BI Server

  1. BI server uses settings specified in the settings.xml file. See its structure and make modifications if required.

NOTE. A file with settings is optional. If the file is absent, default parameter values are used.

  1. To get information about repositories to work with, BI server uses the registry.reg or Metabases.xml file. For details about setting up these files, see the Configuration and Setup article.

  2. Activate Foresight Analytics Platform.

  3. All additional files used by BI server must have access permissions for an Apache HTTP Server user:

sudo chown -R apache:apache /opt/Foresight/fp9.2-biserver

  1. After determining settings and granting permissions restart BI server service:

sudo service httpd restart

  1. Check BI server performance.

The installed BI server will work in background as a separate Linux service. The Apache2 instance with BI server starts on the 808x port, where xx corresponds to the minor version of Foresight Analytics Platform.

After installing and setting up BI server, proceed to the web application back end installation.

See also:

Installing BI Server on Linux OS