Help:Installation

From Meta, a Wikimedia project coordination wiki
This is an archived version of this page, as edited by 84.69.202.236 (talk) at 18:46, 19 April 2007 (→‎Uploading to the server). It may differ significantly from the current version.
 
This page should be moved to MediaWiki.org.
Please do not move the page by hand. It will be imported by a MediaWiki.org administrator with the full edit history. In the meantime, you may continue to edit the page as normal.

This page guides you through the process of installation of the latest stable version on linux. There is another page for installation from Subversion. The 1.6 series is the last to support versions of PHP earlier than PHP 5.

There are also guides for installing MediaWiki on Windows and IIS, which is a little harder:

MediaWiki can be difficult to install for the average computer user who does not have experience with Apache, PHP and MySql. Most users who wish to use wiki software may benefit from using a free wiki host (see a list of wiki hosts on Wikibooks).

Preparations

Minimum system requirements

The recommended minimum settings is 256MB of RAM for a single-computer website, although this will not suffice for a busy public site. Some users have reported running MediaWiki on computers with as little as 48MB of RAM.

Prerequisites

Before you can install MediaWiki, there are four prerequisite components you must install. When you install these, remember to read the associated documentation. If your website is hosted for you then contact the server administrators or hosting company to ensure these are installed.

  1. An Apache web server, available at the official download page.
  2. A recent version of PHP, the programming language in which MediaWiki is written. This is available from the official download page. As of version 1.7 PHP 5.x is required -- PHP 4.x is not supported from this version onwards.
    • See PHP config for compiling options
    • Some Linux servers may also require the equivalent MySQL package and PHP session management package; see the documentation for the operating system.
    • When installing on windows using the Microsoft installer, add the extension for your database of choice (MySQLi or PostgresSQL) to the features to be installed.
    • If your Apache server has the Hardened PHP patch, you may need to edit several variables in your /etc/php.ini file if you wish to have Wiki pages with large amounts of content. In particular, consider the settings for varfilter.max_value_length, hphp.post.max_value_length, and hphp.request.max_value_length. The default settings may limit your pages to less than 10k or 64k in size.
    • Many people report blank pages in recent versions after submitting articles to their new wiki. A likely cause is the memory limit in default php installations (usually 8 MB). Please check your PHP and/or Apache error logs. To modify this setting edit /etc/php.ini and increase the "memory_limit" setting. For example to raise it to 20 MB replace the existing text with "memory_limit = 20M". Make sure to restart your Apache server after you have changed this value.
  3. A MySQL database server, which will be used to store all the text and data. This is available from the official download page.
    • As of version 1.8, Postgres is also supported. It should be noted that support for Postgres is very new and not as well tested as the MySQL equivalent.
  4. MediaWiki itself, which is available from the official download page. Development versions are available from the Sourceforge.net project page.

HAHAHA

Configuration

Local settings

After setup, a file called LocalSettings.php is created in the "config" directory. This file contains all the information needed by MediaWiki to run. If it does not find the file in the main folder, it will launch the installation script to create a new one in the "config" directory.

  1. Move this file to the main wiki directory (if you installed MediaWiki to public_html/wiki, move it there). Do not leave a copy in the config folder, as this poses a severe security risk.
  2. Set stringent permissions on the LocalSettings.php file. ( chmod 600 and chown <webserver owner> )
  3. Delete the entire "config" directory.

Advanced configuration

For help with more advanced technical configuration, see Help:Configuration and Help:Administration.

For a brief overview that addresses the empty help pages and text and layout modification, see Help:Installation-Software_Configuration.

Uninstallation

Removing MediaWiki entirely can be accomplished in two steps: removing the directory where MediaWiki was installed, and dropping the MediaWiki database from MySQL or Postgres.

For example, if you installed MediaWiki to /var/www/mediawiki-xyz, you might do

rm -r /var/www/mediawiki-xyz

MySQL

To remove the MySQL database holding your wiki, use the mysql utility to interactively connect to MySQL as a user with adequate permissions, then issue the following command at the mysql> prompt:

DROP DATABASE wikidb;

(If you needed to retain some tables, you could also drop just some of the tables individually. See this MediaWiki-L message for details.)

Postgres

To remove the Postgres database holding your wiki, run the following command:

 dropdb wikidb

You can also connect as a superuser using the psql program and issue:

 DROP DATABASE wikidb;

See also

External links

  • Lopez, Daniel Sams Teach Yourself Apache 2 in 24 Hours. Excellent easy to use book, the 3rd chapter, which explains how to install Apache, can be viewed on Amazon.com here (must register with Amazon first to view pages)
  • An outdated explanation of how to install, configure, and get Apache 1.3, MySQL 3, PHP 4 running under Windows XP in less than 30 minutes. (This document is significantly out of date, having been updated October 5, 2003, but is otherwise well written!) For example, as of January 1, 2006:
    1. It references Apache 1.3, Apache 2.2 is current. The syntax it suggests for httpd.conf prevents Apache from restarting.
    2. It references PHP 4. PHP 5.1 is current.
    3. It references MySQL 3.23. MySQL 5.x is current.
  • Life Hacker has instructions for installing MediaWiki on Windows XP.

Deploying MediaWiki with Sun Java System Web Server 7.0

  • Sun has recently released their latest version of Web Server - Sun Java System Web Server 7.0(formerly known as iPlanet Enterprise Server or Sun ONE Web Server). Here is a technical article on how to deploy MediaWiki with Sun Java System Web Server 7.0. Feel free to post your queries and concerns that you run into at Sun's Web Server Software forum
  • Also, if you need more help on how to get PHP as such working with Sun Java System Web Server 7.0, then check out this article which describes the steps involved in configuring and running PHP with Web Server 7.0.

Natarajan 02:03, 24 January 2007 (UTC)[reply]


  • A compact step-by-step guide to configure WAMP + MediaWiki is also available.

For Windows XP, I think you may want to point users to a site similar to XAMPP for Windows. This appears to cover the basic requirements of Apache, PHP and MySQL.

See also :

Links to other help pages

Help contents
Meta · Wikinews · Wikipedia · Wikiquote · Wiktionary · Commons: · Wikidata · MediaWiki · Wikibooks · Wikisource · MediaWiki: Manual · Google
Versions of this help page (for other languages see further)
What links here on Meta or from Meta · Wikipedia · MediaWiki
Reading
Go · Search · Namespace · Page name · Section · Backlinks · Redirect · Category · Image page · Special pages · Printable version
Tracking changes
Recent changes (enhanced) | Related changes · Watching pages · Diff · Page history · Edit summary · User contributions · Minor edit · Patrolled edit
Logging in and preferences
Logging in · Preferences
Editing
Starting a new page · Advanced editing · Editing FAQ · Export · Import · Shortcuts · Edit conflict · Page size
Referencing
Links · URL · Interwiki linking · Footnotes
Style and formatting
Wikitext examples · CSS · Reference card · HTML in wikitext · Formula · Lists · Table · Sorting · Colors · Images and file uploads
Fixing mistakes
Show preview · Reverting edits
Advanced functioning
Expansion · Template · Advanced templates · Parser function · Parameter default · Magic words · System message · Substitution · Array · Calculation · Transclusion
Others
Special characters · Renaming (moving) a page · Preparing a page for translation · Talk page · Signatures · Sandbox · Legal issues for editors
Other languages:

Reference