Chapter 2. Installing MediaWiki

In order to run MediaWiki, you need a Web server, support for PHP, and a database, either MySQL or Postgres. The simplest way to install MediaWiki is to install it on a computer running Linux or a Unix-like operating system, with the Apache Web server and mod_php installed. The PHP installation should be version 5.0 or later (don't use 5.1 with 64-bit computers, as there are reportedly some bugs), and the database should be either MySQL 4.0 or later, or Postgres 8.0 or later. This is the basic configuration that Wikipedia's servers run and the configuration on which the developers of MediaWiki focus their efforts. It is also possible, although a little more difficult, to install and run MediaWiki on Windows servers.

Apache is not the only Web server you can use, but it is the best of the options, for a few reasons. First, because of the success of Wikipedia, we know that MediaWiki has been installed on a high-traffic website that uses Apache servers, and we know that this configuration works reliably and can scale to accommodate whatever optimistic growth expectations we have about our own wiki endeavors. Second, the Apache/PHP combination is pervasive and readily available. PHP can be loaded as a dynamic shared object (DSO) in Apache, which makes installation and configuration a much simpler task in most cases. While the core PHP libraries are supposed to be threadsafe, not all of the many extensions available for it are, so experts often recommend ...

Get Professional Wikis now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.