mediawiki admin guide ##########################
This post will document some common procedures that an admin will need to maintain a media wiki installation.
.. contents::
View the source of any wiki page. Locate the generator meta tag inside the head tag.
Example:
.. code-block:: html
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”>In the example above our generator is MediaWiki 1.16.2.
This documents the steps I took to migrate MediaWiki to a new server and then upgrade to the latest version. RHEL4 to Ubuntu.
Install the webserver stack on new server:
.. code-block:: bash
sudo apt-get install apache2 php5 php5-mysql php5-cli php-apc graphviz graphviz-dev
sudo cp -p /etc/apache2/sites-available/default /etc/apache2/sites-available/001-wiki
sudo vim /etc/apache2/sites-available/001-wiki
Basic MediaWiki configuration:
.. code-block:: apache
<VirtualHost *:80> ServerAdmin webmaster@localhost ServerName wiki.foxhop.net
LogLevel warn ErrorLog /var/log/apache2/error-wiki.log CustomLog /var/log/apache2/access-wiki.log combined
DocumentRoot /www/wiki/mediawiki
Create directories and download sourcecode:
.. code-block:: bash
sudo mkdir /www sudo mkdir /www/wiki cd /www/wiki # copy mediawiki installation to new server and untar it sudo tar -zxvf mediawiki-backup.tar.gz sudo chown -R root:www-data /www chmod 775 mediawiki/config/ -R
import MySQL dump into new server
.. code-block:: bash
mysql -u root -p wikidb < wikidb-dump-2012-11-26.sql
Enable Virtual Host and restart Apache
.. code-block:: bash
sudo a2ensite 001-wiki sudo a2dissite default sudo apache2 restart
Navigate to the new servers IP address or domain name and verify migration.