From Mageia wiki
Jump to: navigation, search

Testing procedure for MediaWiki

Based on Samuel Verschelde's procedure on bug 12337#c11, dated 2014-02-10.

This procedure yields if you have no existing Mediawiki instance on your computer. Better to follow it in a VM. Note that it does not test all the mediawiki subpackages.

Phase 1: test mediawiki from the supported repos, but not the one from testing

We will create a new wiki.

First, make sure the metapackage task-lamp is installed.

 urpmi mediawiki --search-media "core updates"

Then select one backend among mediawiki-{mysql,pgsql,sqlite}.

Start apache:

 service httpd start

Start mysql or postgresql if you chose that as a backend or reboot the computer, this will also start the services.

For PostgreSQL
Before starting the MediaWiki installation, set up its PostgreSQL USER and DATABASE (with your own values for each item; mediawiki for all three?!):-

# psql -U postgres
postgres=# CREATE USER <wikiuser> WITH NOCREATEDB NOCREATEROLE NOSUPERUSER ENCRYPTED PASSWORD '<password>';
postgres=# CREATE DATABASE <wikidb> WITH OWNER <wikiuser>;
postgres=# \q

Visit http://localhost/mediawiki/ and click the "setup the wiki first" link.

Follow the instructions. Default answers are ok most of the time, including any empty fields. Remember the name and password of the administrator user for Mediawiki. Put in a real e-mail address. At some point, it asks if you want to continue with more questions or stop here. I chose to stop there, do as you want.
For PostgreSQL, in the 'Schema' box, 'public' is sensible; but possibly anything goes.

Put the LocalSettings.php file they ask you to download in /etc/mediawiki/LocalSettings.php (as root).

When installation is complete, access your brand new wiki. Connect as the admin user you created.

Modify the starting page and add [[New page]] somewhere. Submit then follow that link to create your new page. Put some contents in it.

Phase 2: install the update candidate

  1. urpmi mediawiki --search-media "updates testing"

Go to http://localhost/mediawiki/ and check it works as before. Create a new page.


Now we will check that wiki creation still works.

First delete your wiki:

 rm /var/www/mediawiki -rf 
 rm /etc/mediawiki -rf

Note that this will remove not only your wiki but also some files from the installed RPM. To fix that:

 urpme mediawiki #(will give some error message, that's our fault, it's normal)
 urpmi mediawiki --search-media "updates testing".

Delete the database. If you chose mysql and called your database my_wiki:

 mysql -uroot
 drop database my_wiki;

If someone has a better solution to remove an existing wiki, please improve the procedure :)

It's not totally removed yet, one last step: browse to http://localhost/mediawiki/mw-config/index.php?page=Restart&lastPage=Complete to make it restart the installation from 0.

Then repeat steps from phase 1 to create a new wiki and check it works.


Return to the QA portal