Sunday, August 14, 2011

Spatial Wiki 4 - Install MediaWiki

With a new Amazon EC2 Web Server Setup it's time to get the wiki part of our Spatial Wiki operational and for this we'll be installing MediaWiki.  For anyone that's not familiar with MediaWiki it's a popular choice for wikis, it's written in PHP, and it typically connects to a backend MySQL database where all the wiki content (except uploads) is maintained.  Wikipedia is powered by MediaWiki and there are hundreds of extensions available which speak to scalability, supportability, and extensibility ... aside from all this it's pretty easy to install and configure and extremely capable.

To install and configure MediaWiki login to the EC2 server and do the following:
apt-cache search mediawiki

This will search the local cache of applications that can be installed for anything that contains mediawiki. There are other ways to go about this, but this will typically locate an application that has already be setup and configured for the specific flavor of Ubuntu that you're running and then allow you to easily install it from the on-line repositories. When I run the search on the new EC2 server the package I want looks like it might be:

mediawiki - website engine for collaborative work

I can get more information about the package in question by doing:
apt-cache show mediawiki

And then install it with:
sudo apt-get install mediawiki

Once MediaWiki is installed follow the configuration steps listed here:

https://help.ubuntu.com/10.04/serverguide/C/mediawiki.html

Specifically, edit the Apache configuration file for MediaWiki:
sudo vi /etc/apache2/conf.d/mediawiki.conf

Just uncomment the line # Alias /mediawiki /var/lib/mediawiki, save the file and restart Apache with:
sudo /etc/init.d/apache2 restart

The next part of the configuration is via a webpage on your server, navigate to the new wiki webpage and follow the steps, for example starting at:

http://[your server IP]/mediawiki/

Use all the defaults and enter required information, note specifically:

  • Give the wiki a reasonable name, SpatialWiki for example
  • Enter and record an admin password for the WikiSysop user, this will be the admin account for MediaWiki
  • Enter and record a password for the wikiuser account into the MySQL wiki database, this account will be created in MySQL
  • Select the option and enter the root password for MySQL, this account will be used to create the wikiuser account in MySQL
  • A good idea to give the wiki tables a prefix, for example sw_.  This isn't critical, but my be useful if we are add tables of our own that we want to be able to easily differentiate.

When the setup is complete move the MediaWiki configuration file as follows:
sudo mv /var/lib/mediawiki/config/LocalSettings.php /etc/mediawiki/.

You'll be able to get to your new wiki at:

http://[Your Server IP]/mediawiki/index.php/Main_Page

It will look like:




















See the next step on Setting up PostgreSQL.


0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home