Skip to content

Compile and Install

Mario Karlovcec edited this page Jul 14, 2016 · 14 revisions

#Prerequisites The following external components are required to successfully compile and install the system:

  • Java 7+
  • Node.js
    • In order to compile the QMniner you have to install node.js v6.x, v5.x, v4.x or v0.12.x
  • NPM
    • npm 2.11 or higher is required
  • QMiner
    • If node.js and npm are acquired, QMiner library will be installed using the Qminer Analytics run script. Instructions for separate installation and compiling from source can be found here.
  • Apache Tomcat 7+
  • Maven (for compilation)
  • other dependencies defined in the Maven project.

This webapp has been tested on Windows 7 with Java 1.7.0.13 and Tomcat 7.x.

The system is composed of two main components (web servers): Tomcat with the fi-impact webapp and QMiner Analytics with the corresponding set of scripts.

Web application

##Compile

  • In order to compile the webapp you have to install Java 1.7+ and Maven (tested with Maven 3.3.9).
  • get the project source from github
  • from the project root run Maven with the install target: mvn install
  • If the build is successful, the deployment war is in the target directory and the unpacked webapp in in the target/fi-impact directory of the project. You can use either to deploy to your Tomcat installation, under the webapps directory.

Install

You need a standard Tomcat 7+ installation before proceeding. We also assume you have a basic knowledge about Tomcat installation and management.

Then, you have to decide if you would like to use digested or plain text passwords. Digested is highly recommended, therefore the instructions that follow assume all passwords are digested.

  1. Deploy the fi-impact webapp: either copy the installation directory or deploy the war file
  2. Stop Tomcat
  3. Set digest method
    1. Open $CATALINA_HOME\conf\server.xml
    2. Change the User Database digest method: <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/> => <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase" digest="MD5"/>
    3. Save and close
  4. Digest existing passwords and create the fiadmin user. In this step, you will digest (ie replace plain password with hash) the current password and add the administrator user for the fiimpact webapp.
    1. Open $CATALINA_HOME\conf\tomcat-users.xml
    2. For each existing user replace the value of the "password" attribute with the MD5# of the values. You can do that with the digest script provided by Tomcat: $CATALINA_HOME\bin\digest.bat -a MD5 -e UTF-8 my_plain_text_password
    3. Create a new role and user by adding the following lines (replace 9999... with your MD5# password):
      1. <role rolename="fiimpact"/>
      2. <user username="fiadmin" password="999999999999999999999999" roles="fiimpact"/>
    4. Save and close
  5. Create the $CATALINA_HOME\ailog for log files
  6. You now need to customize few settings of your webapp deployed in in $CATALINA_HOME\webapps\fi-impact:
    1. In fi-impact\WEB-INF\fop\fop.xconf set the <base> element value (see example in the file).
    2. In fi-impact\WEB-INF\web.xml set the following <context-param> values:
      1. upload-diris the directory where all imports are stored
      2. temp-upload-diris the temporary directory for imports d
      3. qMinerUrlURL to the QMiner server, see previous section
  7. You can now start Tomcat and test your webapp: go to http://server:port/fi-impact/fi-impact/ui/admin/index.html and try logging in.

#QMiner Analytics QMiner Analytics part of the project performs data analytics using QMiner - data analytics platform for processing large-scale real-time streams containing structured and unstructured data. This part of the project is located in the root/src/node-analytics/ directory of the repository. It is assumed that the source was required from github repository and that the prerequisites node.js and npm are installed.

Install

  1. From the root of fi-impact go to the root of the QMiner Analytics by running the command cd src/node-analytics/
  2. From root/src/node-analytics/ start the service using the run script with command ./run.sh.
    1. The run script first executes npm install command. This command downloads all the required node.js packages required for QMiner Analytics, using the NPM (node package manager). This includes the QMiner, which is the core for QMiner Analytics. The packages which are downloaded and installed using the npm install command are specified in the root/src/node-analytics/package.json file.
    2. Next the run script moves to root/src/node-analytics/src/ and executes node app command. This command starts the QMiner Analytics node application.

Settings

QMiner Analytics application specific setting are defined in the root/src/node-analytics/src/config/main_config.json file:

  • MDS_time_sec - number of seconds Image result for multidimensional scaling (MDS) algorithm is executed.
  • MDS_max_steps - limit of steps for MDS algorithm.
  • prj_data_fn - if the data is loaded from the static file, specify the file name in root/src/node-analytics/data/ directory of the project.
  • main_graph_fn - specify the file name for storing main graph computed using textual features.
  • main_graph_all_fn - specify file name for storing main graph based on all features.
Clone this wiki locally