Install a MediaWiki codebase

From Organic Design wiki
Revision as of 01:08, 27 July 2009 by Rob (talk | contribs) (add tree checkout proc)
Procedure.svg Install a MediaWiki codebase
Organic Design procedure

This article describes installing a new version of the MediaWiki software itself. This is a framework which can be thought of as a class which provides the interface structure and database schema for any instances of the software which are separate evolving databases. This process is also useful for creating a duplicate of an existing codebase for experimentation.

File structure

<bash>
  1. Installed versions

/var/www/mediawiki-1.6.7/ /var/www/mediawiki-1.9.3/ /var/www/mediawiki-1.10.0/ /var/www/mediawiki-1.11.0/

  1. Example of template filesystem Symbolic link to common MediaWiki instance

/var/www/wikis/template/wiki -> /var/www/mediawiki-1.10.0/ </bash>

Download

  1. Download a version of MediaWiki to the server you want to install it on. Using wget on a server to download a version e.g.
<BASH>

cd /tmp wget --proxy http://download.wikimedia.org/mediawiki/1.13/mediawiki-1.13.2.tar.gz tar -zxvf mediawiki-1.13.2.tar.gz su mv /tmp/mediawiki-1.13.2 /var/www </BASH>

  1. checkout the source tree of the latest skins
cd /var/www
mkdir skins/ && cd skins
svn co http://svn.wikimedia.org/svnroot/mediawiki/trunk/phase3/skins skins-phase3-trunk
Codebase hacks
  1. Change the constants in Article.php functions getBlankingAutosummary, getAutosummary and the end of delete to $GLOBALS['wgTruncatedCommentLength'] (bugzilla report 2007-10-02 11543)

Installation steps

  1. Unpack the tar.gz distribution into /var/www leaving the directory name of the version untouched. The config directory must be set to chmod a+w config
  2. Set the /var/www/domains/setup.organicdesign.co.nz symlink to point to the new codebase. If it is a local installation /var/www/domains/setup.localhost and include setup.localhost in your etc/hosts: 127.0.0.1 localhost setup.localhost
  3. A symlink needs to be added in the codebase during initial setup called wiki which points to it's parent, the codebase dir e.g. ln -s /var/www/mediawiki-1.11.1/ wiki
  4. Go to http://setup.organicdesign.co.nz/wiki/config in your browser and run through the install the db user bender, and any template db name (but please note, you must use a table prefix with trailing underscore for add-db to work with it as a template!). Use your own account for sysop rather than "WikiSysop". If it is a local installation http://setup.localhost
  5. Move the config/LocalSettings.php into the main /wiki directory
  6. Edit the LocalSettings.php file, remove the db user, password and prefix and append to the end of the script: include('extensions/wikia.php');
  7. Replace the extensions directory with a symlink to /var/www/extensions
  8. Run make in the wiki/math directory
  9. Add the DPL DB update shown at DPL:DPL:Manual - Source and Installation (after we figure out why it's not working!)
  10. Create a template database for major releases of MediaWiki (either copy and upgrade an existing template, or add to the base install)
mysqldump -u user -p db-name > /var/www/empty-x.xx.sql
Note: see section below for DB user details
  1. Not sure if this is still relevent, but the template-db's may need a column added for DPL, see OD:01 May 2007

MediaWiki MySQL user

Mediawiki is setup with the mysql user account Bender with the password specified as in MW:LocalSettings.php through the include of Wikia.php. User Bender has privileges to create and access all the wikia databases.

Next

See also