Manual:Running MediaWiki on FreeBSD

This installation guide assumes you are installing on the local machine (localhost) and that you are logged in as the superuser (root).

Set up the requirements
Instructions tested on 10.1 with the newest[] packages.

pkg install mysql55-server apache24 mod_php5 php5-xmlreader php5-ctype tidy

Start the data base server /usr/local/etc/rc.d/mysql-server onestart

Create an account for administrate the MySQL mysqladmin -u root password password ; history -c

Edit the config file of the web server Apache $EDITOR /usr/local/etc/apache24/httpd.conf LoadModule php5_module	libexec/apache24/libphp5.so  DirectoryIndex index.php index.html AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps  DocumentRoot "/usr/local/www/mediawiki"  Options Indexes FollowSymLinks DirectoryIndex index.php index.html AllowOverride None Order allow,deny Allow from all 
 * 1) DocumentRoot "/usr/local/www/apache24/data"

Edit the config file of system environment (after reboot) $EDITOR /etc/rc.conf hostname="wiki.example.tld" apache24_enable="YES" mysql_enable="YES"

Install MediaWiki
Otherwise, if you have reasons to install MediaWiki itself with the packages, search the latest release with: pkg search mediawiki

SVG support
Add the following lines to LocalSettings.php to allow SVG upload and to enable thumbnail and preview rendering with Inkscape:

$wgFileExtensions = array('png', 'gif', 'jpg', 'jpeg', 'svg'); $wgSVGConverters = array(   'Inkscape' => '/usr/local/bin/inkscape -z -w $width -f $input -e $output',); $wgSVGConverter = 'Inkscape';

Obviously, Inkscape must be installed for this to work (pkg_add -r inkscape). Wikipedia is still using rsvg for SVG rendering, which produces less accurate results than Inkscape but is faster.