Installation v0.8

From SONIVIS:Wiki

Jump to: navigation, search
This is a guide for installing and configuring SONIVIS:Tool.

This is for the old version of SONIVIS. Please see Installation_GNU_R or Developer_Portal

Contents

Software installation

Java JRE

  1. Download and install Java JRE.

GNU R

  1. Download and install GNU R.
  2. Download and install the following R-libraries. For this you have to run R and type:
  install.packages("rJava")
  install.packages("sna")
  install.packages("pls")
  install.packages("RMySQL")
  install.packages("Rstem", repos = "http://www.omegahat.org/R")
  install.packages("igraph")
  install.packages("tm")
  • for R 2.6.2, you have to use one of these files: igraph.7z (for Windows) or igraph.tar.gz (for Linux) for the installation of the igraph package.
  • for R 2.6.2, you have to replace the tm directory with these directory: tm.zip (for Windows) after the installation of the tm package.
  • In some cases, the sequence of the installation of the packages can be important. Please use the indicated order.
  • R 2.5: The packages will be installed to a new folder in your home directory (/home/username/ on Linux, /Users/username/ on Windows Vista or Mac OS X, \Documents and Settings\username\ on Windows 2000, Windows XP and Windows Server 2003). There is a possibility that the tool won't find them there when needed. To solve the problem, copy the folders of all newly installed packages into the library/ folder of R. Caution: There may be problems with newer versions of JavaGD and iplots - consider upgrading R in this case.

Database

If you have a MediaWiki installation and the access data for its MySQL database, you can skip this step. If not:

  1. Download and install a MySQL database server (like MySQL 5.0 or XAMPP).
    • Here you find an installation guideline for MySQL 5.0.45 Win32.
  2. PLEASE enable InnoDB engine BEFORE importing the database in order to gain more performance at analysis time. Do so by editing my.cnf (in Windows it should be in "mysql\bin" directory - in Linux it should be somewhere in /etc/ (or just type "locate my.cnf" ;-)) and replace
    skip-innodb
    with
    #skip-innodb
  3. Import a MediaWiki database (e.g. use a prepared german or english Wikiversity database incl. Stored Procedures or a database from Wikimedia's dump service)
    • Start the installed database server.
    • Unpack the generated / downloaded mediawiki database SQL file (e.g. wikiversity.sql).
    • Run cmd (Windows) or start a Terminal (Linux/MacOS X) and type:
[YourDatabaseServerDirectory]/mysql/bin>mysql -u root -p [DBName] < [SQLFile]
# Dependent on the SQL file you have to create the database before: [YourDatabaseServerDirectory]/mysql/bin>mysql -u root -p --execute="create database [DBName]"

Settings

for Windows

You have to add some directories to your PATH environment variable. If you do not know how, consult article.

  1. The directory containing R.dll (e.g. C:\Programme\R\R-2.6.1\bin) must be in your PATH.
  2. The directory containing jri.dll (e.g. C:\Programme\R\R-2.6.1\library\rJava\jri) must be in your PATH.
  3. The directory containing libmySQL.dll (e.g. C:\Programme\R\R-2.6.1\library\RMySQL\libs) must be in your PATH.

for Linux

  1. R_HOME Variable: add a new environment variable R_HOME (e.g. export R_HOME="/usr/local/lib/R/")
  2. rJava: add the jri path (e.g. /usr/local/lib/R/library/rJava/jri) to $PATH
  3. JavaGD: add directory ../JavaGD/libs/ to LD_LIBRARY_PATH (e.g. /usr/local/lib/R/library/JavaGD/libs/)

SONIVIS-Tool installation

  1. Download and unpack with 7zip.
  2. Start the tool with SONIVISTool (Linux) respectively SONIVISTool.exe (Windows). If you encounter any problems starting SONIVIS:Tool under Linux, please adjust the variables in startSONIVISTool (a bash script) according to your setup and try starting with this script.

Stored Procedures

In SONIVIS:Tool, you can use precomputed database tables for your analyses. For example, there is a precalculated table with links of every revision. That raises performance significantly, because the tool does not have to search for links in the revision texts.
For german and english Wikiversity, we have already precalculated all tables—you may download the result here: german or english.

Creating Stored Procedures

For the creation of the Stored Procedure tables, you have to download the stored procedures here. After downloading and unpacking the SQL scripts you have to execute them. In order to do this, run cmd (Windows) or start a Terminal (Linux/MacOS X) and type:

[YourDatabaseServerDirectory]/mysql/bin>mysql -u root -p
Enter password: (after installation no password is set)
...
mysql> use [DBName];
mysql> source [ScriptPath]/1create_pagelinks.sql;
mysql> source [ScriptPath]/2create_templatelinks.sql;
mysql> source [ScriptPath]/3create_revlength.sql;
mysql> source [ScriptPath]/6create_revdiff.sql;
mysql> source [ScriptPath]/8create_edges.sql;
mysql> CALL 1create_pagelinks;
mysql> CALL 2create_templatelinks;
mysql> CALL 3create_revlength;
mysql> CALL 6create_revdiff;
mysql> CALL 8create_edges;
mysql> exit;
[YourDatabaseServerDirectory]/mysql/bin>vi NamespaceUpdates.sql

Edit the NamespaceUpdates.sql file and add or uncomment namespaces according to your project.

[YourDatabaseServerDirectory]/mysql/bin>mysql -u root -p [DBName] < NamespaceUpdates.sql

Error Handling

If you encounter any errors please follow these guides:

Personal tools