Manual:Installation

Prerequisite tools
To install MediaWiki you need four components:
 * MySQL - an SQL database to store the Wiki text, user list etc.
 * Apache - a web server to serve the HTML web pages
 * PHP - the programming language that MediaWiki is written in
 * MediaWiki itself, which is a suite of programs written in PHP

Minimum system requirements
Slow performance has been reported on systems where the whole site is on a single Pentium 133 with 48MB of RAM. 256MB is the recommended minimum amount of RAM for a single computer site but you're certain to need more for a busy public site. The Wikimedia Apaches typically have 512MB to 1GB and the databases servers 4GB.

As your site grows
If you have the RAM you should also use Memcached, which will require at least 80MB or more of RAM, about 60MB for code plus whatever you need for cache. The user interface text wil be cached by memcached, as will logins and partially completed pages.

The database and Apaches will start to fight for the RAM as you become more busy and your next step is likely to be a split of the database server and Apache web server(s) onto different computers. You're likely to need to turn off swap on the database server - the operating system often seems to allocate too much RAM to cache on database servers.

If you're still seeing mostly author traffic and not many readers, adding more Apache computers is next. If you are seeing many readers, a Squid computer first is probably a better choice.

Busy sites should use a Squid cache server between the Apaches and the internet. For Wikimedia the Squids handle 70-80% of all page views, including most by those not logged in. It's extremely important as traffic rises. Ideally you'll have enough RAM on the Squid(s) to hold the current version of all articles but in practice you're likely to use some disk storage as well. Squid can use up to 2GB of RAM directly, more for operating system caching. Wikimedia typically uses 3GB or 4GB per Squid.

Wikimedia uses an approximate ratio of one 4GB Squid to five 512MB 3GHz P4 Apaches to one 4GB dual Opteron database server with 6 fast disks in RAID 10. One or two of the Apaches will have extra RAM beyond the 512MB needed for Apache and that is used for Memcached - up to two or three gigabytes per computer. One set like this should handle about 150 to 200 page views per second. For press links and slashdotting the Squid should handle at least twice that.

General install instructions
installation instructions

Upgrading instructions
upgrading MediaWiki

CVS instructions
MediaWiki from CVS

Platform-specific install instructions
There are specific guides for installs on the following operating systems:


 * Running MediaWiki on Linux
 * Running MediaWiki on Debian GNU/Linux
 * Running MediaWiki on Gentoo Linux
 * Running MediaWiki on Mandrake
 * Running MediaWiki on Slackware Linux
 * Running MediaWiki on FreeBSD
 * Running MediaWiki on Mac OS X
 * Running MediaWiki on Windows
 * Wiki on a stick