Manual:Running MediaWiki on FreeBSD

Part of the Running MediaWiki series.

Most of the prerequesites for running MediaWiki can be installed on FreeBSD from the ports system. See http://www.freebsd.org/ports/

Database
Install MySQL from ports, databases/mysql40-server.

Web server
Apache can be installed from ports, www/apache13 or www/apache2.

I haven't tried PHP from ports, but have been custom-compiling it as a DSO module.

TeX support
Install these from ports if you haven't already got them:


 * lang/ocaml
 * print/latex
 * print/dvips
 * graphics/ImageMagick

texvc's Makefile requires GNU make. Once ocaml is installed, go into the math/ subdirectory of the MediaWiki package and run 'gmake'. The texvc executable will be installed by install.php if you use it and have $wgUseTeX set to true, or you can copy it in manually. Put it in 'math' subdirectory under where wiki.phtml is.

The MediaWiki-1.1.0 and earlier releases use an option for dvips which the ports version doesn't support. The latest CVS version has used a more compatible option; if using an older release, edit render.ml and change "-o -" to "-f" at the end of the first line, then build texvc.

Note that latex, dvips, and convert must be in the PATH for texvc to shell out to them. If apache is started on system startup it may not have /usr/local/bin in the PATH, and this PATH will be inherited by texvc and image output won't happen. Restart apache after boot, or put this into LocalSettings.php:

putenv("PATH=".getenv("PATH").":/usr/local/bin");

Memcached
haven't tested latest versions