2. Wiki Software 1.1

From BlueSpice

Jump to: navigation, search

This document describes the installation steps for WikiSoftware 1.1 and WikiSoftware 1.1.1.


About this manual

  • When editing configuration files in a text editor be sure to save them as UTF-8 without BOM (Byte Order Mark).
  • The string <unzipped-archive> represents the place where you unzipped the downloaded extension.
  • The string <mediawiki-url> represents the URL of your Mediawiki installation, e.g. http://localhost/mediawiki.
  • The string <installpath-mediawiki> represents the file system path to your Mediawiki installation, e.g. C:\xampp\htdocs\mediawiki (Windows) or /var/www/mediawiki (Linux).
  • The string <document-root> represents the file system path to the web server root, e. g. C:\xampp\htdocs (Windows) or /var/www (Linux).

If you installed MediaWiki directly into <document-root> then <document-root> and <installpath-mediawiki> are identical.

Requirements

MediaWiki

For the installation of WikiSoftware we assume that MediaWiki (version 1.15x, 1.16x or 1.17.x) is installed and configured. It can be accessed via browser at <mediawiki-url>.

Browser

WikiSoftware works under Firefox 3.6+ and Internet Explorer 7+. Other browsers may work, but have not been tested properly so far.

Server

  • Web server (Apache 2, IIS 7+ seems to work fine but has not been thoroughly tested)
  • PHP versions 5.2.6, 5.2.9, 5.3.0 and 5.3.2 were successfully tested. PHP 5.4 seems to work but hasn't been thoroughly tested.
  • PHP version 5.3.1 has a bug due to which MediaWiki does not work. This affects e.g. XAMPP 1.7.3.
  • MySQL 5.x, PostgreSQL 8.2+, Oracle 10g

These login credentials to the database server should be known:

    • Host/IP address and port
    • Username and password for the root user (CREATE/DROP-Statements) and the Wiki-User
      (probably created during the installation of MediaWiki)
      With an installation on XAMPP the username "root" with empty password is preset.
    • Name of the used database
    • The table prefix of the used database

Installation

Components of WikiSoftware

The <unzipped-archive> contains the following directories and files:

  • wiki-core
  • wiki-mw
  • wiki-skin
  • wewservices
  • installcheck.php

Copy the contents of this file directly into the directory <installpath-mediawiki>.

Copy the folder <installpath-mediawiki>/skins/common to <installpath-mediawiki>/wiki-skin/.

The following directories have to be writable by the web server:

(Under Linux issue e. g. chmod -R a+w <path>)

  • <installpath-mediawiki>/images
  • <installpath-mediawiki>/wiki-core/data
  • <installpath-mediawiki>/wiki-core/config
  • <installpath-mediawiki>/wiki-mw/config

Checking the requirements

To check further requirements for the installation, access <mediawiki-url>/installcheck.php via browser. The page shows additional information about the installation as well as occurring errors (e.g. concerning missing rights).

If everything is OK (green "OK") you can proceed to the setup of wiki:

Setup of wiki

Open the file <installpath-mediawiki>/LocalSettings.php in a text editor and add the following lines at the very end:

$wgUseAjax = true;
$wgDefaultSkin = 'wiki';
$wgStylePath = $wgScriptPath.'/wiki-skin';
$wgStyleDirectory = $IP.'/wiki-skin';
require_once( dirname(__FILE__).'/wiki-core/index.php' );
wsCore::getInstance('MW')->setup();
// MediaWiki extensions
require_once( wsConfig::get('MW::AdapterPath').DS.'ext-dist/Lockdown/Lockdown.php' );
require_once( wsConfig::get('MW::AdapterPath').DS.'ext-dist/Quiz/Quiz.php' );
require_once( wsConfig::get('MW::AdapterPath').DS.'ext-dist/Poem/Poem.php' );
require_once( wsConfig::get('MW::AdapterPath').DS.'ext-dist/CategoryTree/CategoryTree.php' );
require_once( wsConfig::get('MW::AdapterPath').DS.'ext-dist/ImageMap/ImageMap.php' );
require_once( wsConfig::get('MW::AdapterPath').DS.'ext-dist/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.php' );
require_once( wsConfig::get('MW::AdapterPath').DS.'ext-dist/ParserFunctions/ParserFunctions.php' );
require_once( wsConfig::get('MW::AdapterPath').DS.'ext-dist/InputBox/InputBox.php' );
require_once( wsConfig::get('MW::AdapterPath').DS.'ext-dist/Nuke/Nuke.php' );
require_once( wsConfig::get('MW::AdapterPath').DS.'ext-dist/DynamicPageList/DynamicPageList.php' );
require_once( wsConfig::get('MW::AdapterPath').DS.'ext-dist/Cite/Cite.php' );
require_once( wsConfig::get('MW::AdapterPath').DS.'ext-dist/RSS/RSS.php' );

Configuration of WikiSoftware

Point your browser to the URL <mediawiki-url>/wiki-core/setup. Click "Start configuration" and fill in the necessary parameters.

Driver: Select the database driver. The default driver is MySQL.

Host: Fill in the hostname of your MediaWiki installation. The default name is localhost.

User/Password: Provide a database user who has the right to create tables in the database. The database user who is created via a standard MediaWiki installation does not necessarily have these rights! For testing (only!) you can use the database's root user.

Database: Fill in the database name that was used for MediaWiki installation.

Prefix: The WikiSoftware tables will be prefixed automatically with ws_. You can leave this field empty or you can fill in an additional prefix here.

Port: Fill in the port of your database server. The default value is 3306 (MySQL default).

Core::LanguageCode: Select the language for WikiSoftware.

Core::UseMinify: This feature is only tested on Apache. It doesn't work on IIS. If in doubt leave this unchecked.


Back up your database and click here. After a few seconds, the message "Update.php has been executed!" should appear. Click on Details to show the update log. The output looks something like this:

(...)
Creating ws_whoisonline table...ok
(...) 
Creating ws_saferedit table...ok
(...)
...done.

WikiSoftware for MediaWiki can now be reached by browser at <mediawiki-url>.

Performance boost

If you intend to run WikiSoftware in a production environment we strongly suggest that you enable manual localisation caching by adding these two lines at the end (after WikiSoftware) of your <installpath-mediawiki>/LocalSettings.php:

$wgLocalisationCacheConf[ 'storeClass' ] = 'LCStore_DB';
$sgLocalisationCacheConf[ 'manualRecache' ] = true;

Then execute the following command:

php <installpath-mediawiki>/maintenance/rebuildLocalisationCache.php

This command should also be executed on a daily basis. Use the Windows Task Scheduler or a cron job on Linux systems to achieve this.

Almost done

If you don't want to use WikiSoftware's Universal Export or Extended Search features, you are already done here. If you do, you'll need to complete the following steps:

Wewservices

The WikiSoftware extensions "ExtendedSearch" and "Universal Export" are implemented as Java web services. These must be deployed to an Application Server such as Tomcat, Glassfish, Jboss or Jetty. For this manual we assume a running Tomcat installation at $CATALINA_HOME.

Extended Search

The Tomcat connector must be configured with URIEncoding="UTF-8":

Alter the file $CATALINA_HOME\conf\server.xml (Windows) or $CATALINA_HOME/conf/server.xml (Linux) to include it:

<Connector port="8080" maxHttpHeaderSize="8192" URIEncoding="UTF-8" ...

Create the directory for the search index and copy the directory conf from <unzipped-archive>/wewservices/ into it:

Windows:

mkdir C:\xampp\wiki_data\solr\conf
copy <unzipped-archive>\wewservices\conf C:\xampp\wiki_data\solr\conf

Linux:

mkdir -p /opt/wiki_data/solr/
chown -R tomcat55 /opt/wiki_data/solr/ # given that tomcat55 is the tomcat user
cp -r <unzipped-archive>\wewservices/conf /opt/wiki_data/solr/

The path to the Solr configuration (conf directory containing solrconfig.xml) must be set in Tomcat via the variable solr.solr.home:

On Windows add the following line at the beginning of the file $CATALINA_HOME\bin\catalina.bat:

set JAVA_OPTS=%JAVA_OPTS% -Dsolr.solr.home=C:\xampp\wiki_data\solr

On Linux (Debian) add the following line to the end of the file /etc/default/tomcat5.5:

JAVA_OPTS="$JAVA_OPTS -Dsolr.solr.home=/opt/wiki_data/solr"

Restart Tomcat.

Now deploy solr3.5.war from the unzipped archive by copying it to $CATALINA_HOME\webapps\ (Windows) $CATALINA_HOME/webapps/ (Linux):

Make sure the file <installpath-mediawiki>/wiki-mw/config/extension-settings.php contains the line

wsExtensionManager::registerExtension('ExtendedSearch',
    wsRUNLEVEL::FULL|wsRUNLEVEL::REMOTE, wsACTION::LOAD_SPECIALPAGE);

Browse to <mediawiki-url>/wiki-core/setup and click on "Execute update.php" or use a command shell to execute update.php again:

Linux:

php <installpath-mediawiki>/maintenance/update.php

Windows:

php <installpath-mediawiki>\maintenance\update.php

Configure WikiSoftware to use the "Extended Search" web service in your browser:

WikiSoftware (navigation on the left) -> Admin -> Preferences -> WikiSoftware -> WikiSoftware - Core settings -> Extended Search:

  • Host / IP-Address (SolrHost): default = 127.0.0.1
  • Path in url of the application server (SolrPath): default = /solr3.5
  • Port (SolrPort): (cf. the connector port in your server.xml)

WikiSoftware (navigation on the left) -> Admin -> Preferences -> WikiSoftware -> WikiSoftware - MediaWiki settings -> Extended Search:

  • Solr Version: 3.5

Universal Export

Deploy bn2pdf.war by copying it to $CATALINA_HOME\webapps\ (Windows) $CATALINA_HOME/webapps/ (Linux).

Make sure the file <installpath-mediawiki>/wiki-mw/config/extension-settings.php contains the lines

wsExtensionManager::registerExtension('UniversalExport',
    wsRUNLEVEL::FULL|wsRUNLEVEL::REMOTE, wsACTION::LOAD_SPECIALPAGE);
wsExtensionManager::registerExtension('UEModulePDF',
    wsRUNLEVEL::FULL|wsRUNLEVEL::REMOTE, wsACTION::LOAD_SPECIALPAGE);

Configure WikiSoftware to use the "Universal Export" web service in your browser:

WikiSoftware (navigation on the left) -> Admin -> Preferences -> WikiSoftware -> WikiSoftware - MediaWiki settings -> UniversalExport PDF Module

  • PdfService (BN2PDF)

Final Test

In order to test if the web services are running and configured correctly, point your browser to <mediawiki-url>/installcheck.php again and click on "Run WikiSoftware diagnostics". The output should look like this:

Checking Tomcat Services:
Checking URL http://127.0.0.1:8080/solr3.5: OK
Detected Solr version 3.5 matches configured Solr version: OK
Checking URL http://localhost:8080/bn2pdf: OK

Finish

Your WikiSoftware installation should be working now. Have fun!