MediaWiki is a free software open source Wiki package written in PHP. This is a article about, how to install MediaWiki on FreeBSD 10.
Minimum requirements for installing MediaWiki on FreeBSD:
- Any 64 bit processor
- 256 MB RAM
- 85 MB disk space
FAMP server Installation
FAMP server acts as the base for MediaWiki. Hence we need to have FAMP server prior to MediaWiki installation. Install FAMP server by using this procedure.
MediaWiki installation
We can search for the MediaWiki version available in FreeBSD package list using the following command.
pkg search mediawiki
The output will be similar to this
kipi-plugin-mediawiki-4.2.0 Export images to Mediawiki based web service libmediawiki-4.2.0 KDE4 library for accessing MediaWiki sites mediawiki123-1.23.13 Wiki engine used by Wikipedia mediawiki124-1.24.6 Wiki engine used by Wikipedia mediawiki125-1.25.5 Wiki engine used by Wikipedia mediawiki126-1.26.2 Wiki engine used by Wikipedia p5-HTML-WikiConverter-MediaWiki-0.59_1 Convert HTML to MediaWiki markup p5-MediaWiki-1.13_1 OOP MediaWiki engine client p5-MediaWiki-API-0.41 OOP MediaWiki engine client p5-WWW-Mediawiki-Client-0.31_4 Very simple cvs-like interface for Mediawiki websites
The output shows there are 4 versions of MediaWiki available. Out of these you can select the version you intend to install. Let us use package named “mediawiki126” here.
Install the packages
pkg install mediawiki126 git pecl-intl pecl-imagick
Edit the file /usr/local/etc/apache24/httpd.conf and make the following changes.
DocumentRoot "/usr/local/www/mediawiki"
<Directory "/usr/local/www/mediawiki"> Options Indexes FollowSymLinks DirectoryIndex index.php AllowOverride None Order allow,deny Allow from all </Directory>
Restart apache once all the configurations are done.
/usr/local/etc/rc.d/apache24 restart
Database creation
For use with MediaWiki we need to create a database and grant appropriate permissions.
mysql -u root -p mysql> create database mediawiki; mysql> GRANT INDEX, CREATE, SELECT, INSERT, UPDATE, DELETE, ALTER, LOCK TABLES ON mediawiki.* TO 'wikidbuser'@'localhost' IDENTIFIED BY 'password'; mysql> quit
Web based installation
Load the webpage by using the following URL for web based installation.
http://<ip-address>/
Complete the installation through the web pages by providing appropriate information. Once the installation is complete, download the file LocalSettings.php. Then upload the downloaded file to the server using the following command
scp Downloads/LocalSettings.php root@:/usr/local/www/mediawiki/
Reload the webpage and here you go, your MediaWiki server is ready.