Manual:Running MediaWiki on Gentoo Linux

Jump to: navigation, search

Installation guidesManual:Installation guide
on FreeBSDManual:Running MediaWiki on FreeBSD
on GNU/LinuxManual:Running MediaWiki on Linux
- ALT LinuxManual:Running MediaWiki on ALT Linux
- Arch LinuxManual:Running MediaWiki on Arch Linux
- DamnsmalllinuxManual:Running MediaWiki on Damnsmalllinux
- DebianManual:Running MediaWiki on Debian GNU/Linux
- FedoraManual:Running MediaWiki on Fedora
- GentooManual:Running MediaWiki on Gentoo Linux
- MandrivaManual:Running MediaWiki on Mandriva
- Red Hat Enterprise LinuxManual:Running MediaWiki on Red Hat Linux
- SlackwareManual:Running MediaWiki on Slackware Linux
- UbuntuManual:Running MediaWiki on Ubuntu
on Mac OS XManual:Running MediaWiki on Mac OS X
on NetWareManual:Running MediaWiki on NetWare
on SolarisManual:Running MediaWiki on Solaris
- on Solaris 11 / opensolarisManual:Running MediaWiki on Solaris 11 / opensolaris
- on Solaris 10Manual:Running MediaWiki on Solaris 10
on WindowsManual:Running MediaWiki on Windows
- Windows Server 2008Manual:Installing MediaWiki on Windows Server 2008
- Windows Server 2003Manual:Installing MediaWiki on Windows Server 2003
- Streamlined GuideManual:Streamlined Windows Install Guide
- Simple Windows/Apache GuideManual:Simple Windows Apache Installation
on a stickManual:Wiki on a stick
- on MoWeS PortableManual:Installing on MoWeS Portable (Windows)
- on Uniform ServerManual:Installation on Uniform Server (Windows)
- on XAMPPManual:Installing MediaWiki on XAMPP
on Sourceforge.netManual:Running MediaWiki on

Gentoo basics[edit | edit source]

Gentoo Linux uses the Portage package management system, invoked by the emerge command, to download, compile, and install software.

To minimize the chances of having connection problems when you emerge something, add multiple mirror sites to the file /etc/portage/make.conf, as in the following example:


The main website of the Gentoo distribution,, maintains a list of possible mirrors (the ones used above are only for illustration purposes). You can also install the mirrorselect utility to assist in finding and enabling different mirror sites, so you don't have to edit /etc/make.conf yourself:

emerge mirrorselect

Note that every emerge command can be invoked with the --pretend and --verbose options (or -pv for short), so you can see what version of the software will be installed, which version if any is already installed, and what USE flags[1] are recognized by the package. For example:

emerge -pv portage

To ensure you have the latest list of available packages, you can update your local copy of the software tree by issuing the command:

emerge --sync

In addition, when "emerging" a package, the options --update and --deep (-uD for short) can be used to install any updates for all the packages upon which the given package depends.

See the Portage documentation at for more information on all of these aspects of using emerge, especially if you encounter an error when trying any of these commands.

You might also be interested in the functionality provided by ufed (the Gentoo Linux USE flags editor) or profuse (a more GUI-oriented USE flags editor), and gentoolkit (which contains equery and the essential Gentoo utility revdep-rebuild).

emerge ufed
emerge profuse

(You only need one of the above.)

emerge gentoolkit

(Not MediaWiki specific, but essential for maintaining your Gentoo Linux distribution in good working order.)[2]

USE flags and optional packages[edit | edit source]

As of MediaWiki 1.8.5, the following USE flags are supported:[3]

Enables support for Imagemagick (image converter)
Adds math rendering support
Adds mySQL Database support
Adds support for the postgresql database
Initial setup will only allow sysop user to create new accounts, read and edit any pages
Adds support for installing web-based applications into a virtual-hosting environment

Use the imagemagick flag to enable thumbnail creation if you do not want to include support for the gd graphics library in php (see below). Enabling this USE flag will pull in the imagemagick package as a dynamic dependency when you install MediaWiki, but if you want to install it beforehand, use:

emerge -pv imagemagick
emerge imagemagick

(Remember that the -pv option lists package version numbers and USE flags. This "preview" step will not be listed in the following instructions, but is always a good idea to do before emerging a package.)

If you want "math support" — i.e., proper interpretation and display of TeX/LaTeX code enclosed in <math> tags — use the math USE flag. This will pull in the teTeX,[4] Ghostscript, and ImageMagick packages automatically when you emerge the MediaWiki package. Otherwise, you can install them separately, using:

emerge tetex
emerge ghostscript
emerge imagemagick

Required packages[edit | edit source]

Requirements Requirements in short

Image thumbnailing and TeX require additional programs. Parsoid (required by VisualEditor) and other services have their own requirements.

(*) – MariaDB, a GPL fork of the MySQL code by Monty Widenius, the founder of MySQL, is an alternative and can also be used by MediaWiki. Debian/Ubuntu repos.

For experienced users, here is the quick version of the installation instructions. Most users will want to go through all the passages.

  1. Check that your system meets the minimum requirements shown nearby; Installation requirements has more details.
  2. Download MediaWiki (direct link to download the stable release version) and extract the archive to a web-accessible folder on your server.
  3. Point your browser to the directory where MediaWiki was extracted and follow the link to the setup screen. It should be in the form http://domain/directory/mw-config/index.php. Replace directory with the path to your extracted MediaWiki folder. If installing on a local machine, replace domain with localhost. If you install locally and later want to access your wiki from domain, then you will need to change LocalSettings.php from localhost to domain. If installed on a remote server, replace domain with your server's domain name (eg:
  4. Follow the on-screen instructions to complete the process.

These instructions are deliberately brief. There is a lot that could go wrong, so if in doubt, you are advised to read the full instructions!

References[edit | edit source]

  1. USE flags are keywords that affect how the software is compiled and which capabilities are enabled or disabled at compile time; see the documentation on USE flags for more information.
  2. See the Portage documentation.
  4. Until teTeX is deprecated in favor of another TeX distribution; see the teTeX homepage.

See also[edit | edit source]