Personal tools

Mediawiki

From Deep Thought

Jump to: navigation, search

Cyber Sprocket MediaWiki Cheat Sheet Cheat Sheet assumes the wiki database is "wikidb" and the wiki user is "wikiuser".

Contents

About Media Wiki

MediaWiki provides a free, open source web presentation system for community editing of information articles. Cyber Sprocket has written several MediaWiki extensions, some of which have been contributed back to the MediaWiki community.


Installation

Error: tsearch2 is not installed in the database

What Is This?
The tsearch2 add-on for PostgreSQL is not installed. This is a 3rd party application that helps with text search and indexing used by MediaWiki.

Fix

Load the contrib libraries for Postgres. The easiest way is to install from an RPM (for RHEL anyway). Find the appropriate contrib for your version of PostgreSQL. For 8.1.4 on 64-bit RHEL5 the file is:
postgresql-contrib-8.1.4-1.1.x86_64.rpm

When the RPM is installed on RHEL5 the contrib end up at:
/usr/share/pgsql/contrib

After loading the contrib, install it in the wikidb.

  1. psql -U postgres wikidb
  2. \i /usr/share/pgsql/contrib/tsearch2.sql

Now give ownership to wikiuser, you could grant select but owning it avoids some other problems with install scripts running.

  1. alter table pg_ts_cfg owner 'wikiuser';
  2. alter table pg_ts_cfgmap owner 'wikiuser';
  3. alter table pg_ts_dict owner 'wikiuser';
  4. alter table pg_ts_parser owner 'wikiuser';

Error: Checking for Pl/Pgsql ...not installed.

AKA
Attempting to install Pl/Pgsql ...FAILED.
You need to install the language plpgsql in the database wikidb

What Is This?
The plpgsql language is needed to run some of the server-side scripts. The language is part of PostgreSQL but is not attached to the wikidb database.

Fix

From the unix command prompt (assuming root login, or postgresl login:

  # createlang -U postgres plpgsql wikidb

Error: Creating tables...FAILED

AKA
Make sure that the user "wikiuser" can write to the schema "mediawiki"

Fix

Login to the database and grant extra permissions to the wikiuser.

  psql=>  alter role wikiuser with createdb createrole createuser;


Links