Manual:Running MediaWiki on Gentoo Linux

Gentoo basics
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:

GENTOO_MIRRORS="ftp://ftp.heanet.ie/pub/gentoo/ http://ftp.easynet.nl/mirror/gentoo/"

The main website of the Gentoo distribution, Gentoo.org, 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</tt> 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 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</tt> and --deep</tt> (-uD</tt> for short) can be used to install any updates for all the packages upon which the given package depends.

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

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

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.)

USE flags and optional packages
As of MediaWiki 1.8.5, the following USE flags are supported:


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

Use the imagemagick</tt> flag to enable thumbnail creation if you do not want to include support for the gd</tt> graphics library in php</tt> (see below). Enabling this USE flag will pull in the imagemagick</tt> 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</tt> 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 &lt;math> tags — use the math</tt> USE flag. This will pull in the teTeX, Ghostscript, and ImageMagick packages automatically when you <tt>emerge</tt> the MediaWiki package. Otherwise, you can install them separately, using:

emerge tetex emerge ghostscript emerge imagemagick