Installing MediaWiki
From Mavaball
These are the notes I've taken while installing this Wiki
MediaWiki - Links for Getting started
- MediaWiki Download Page - For the average user, you're probably better off going here.
- User's Guide for information on using the wiki software.
- Configuration settings list
- MediaWiki FAQ
- MediaWiki release mailing list
First installation
I downloaded mediawiki-1.12.0.tar.gz, copied it to my Gentoo Linux server, and installed it using these bash command:
cd ~/public_html tar -xvzf mediawiki-1.12.0.tar.gz mv mediawiki-1.12.0 wiki cd wiki cdmod a+w config
Next, I went to ~/wiki via a browser and followed the installation instructions, using my database information. You'll need to create a new database with a corresponding username and password before continuing. This command is needed before the site goes live:
mv LocalSettings.php ..
Locking Down the Wiki
After the basic installation completed, the first thing I noticed was that everyone can create and edit pages. Since I want this to be a personal Wiki for taking notes, I needed to lock down access to only me. I found some good instructions here: Preventing Spam on Mediawiki at SourceForge
As a summary, here are the things I did, based on the article:
- Create an admin account and a user account by clicking on the "Log-in/Create Account" link in the upper-right corner.
- Append the following lines to LocalSettings.php:
# No anonymous editing allowed $wgGroupPermissions['*']['edit'] = false; $wgGroupPermissions['user']['edit'] = true; $wgGroupPermissions['sysop']['edit'] = true; # Only users with accounts can create accounts $wgGroupPermissions['*']['createaccount'] = false; $wgGroupPermissions['user']['createaccount'] = true; $wgGroupPermissions['sysop']['createaccount'] = true;
- If you want to add account accounts later, comment-out the following line, add the new account, then remove the comment character to restrict new account creation again (there's probably other ways to do this, but I haven't researched it yet...)
# $wgGroupPermissions['*']['createaccount'] = false;
At this point, the Wiki should be (mostly) locked-down against spam scripts.
