MediaWiki + Ubuntu 11.04 & Customizations

Recently, I setup a personal wiki for myself since I’m always encountering more information than I have time to read, but always want to go back later. Its also a way for me to organize topics I don’t know as much about as I’d like so that I can remember to come back to those areas later on. (Inspired by fellow UoG Student Eddia Ma: The default install from Ubuntu is pretty simple. I just installed it with the expected:

sudo apt-get install mediawiki

There are some simple steps to follow as you install with the package manager such as setting up the database and first configuration which should be easy enough to get through. However, the wiki required much customization before it would be good for what I was planning on using it for.

Citation Support

First of all, it had to support citations so that I could source the original papers, websites and others. This required the Cite Extension which can be downloaded here: (make sure you select the version that corresponds to the mediawiki version you have installed. Next extract to your extensions folder (likely /var/lib/mediawiki/extensions/ on Ubuntu 11.04). Finally add the following line to your mediawiki configuration file LocalSettings.php (likely in /etc/mediawiki).



I wanted to be able to attach papers directly into my wiki (pdfs and other documents from academic papers). For this I had to add the following line to my LocalSettings.php file (likely in /etc/mediawiki):

$wgFileExtensions = array('png','gif','jpg','jpeg','doc','xls','mpp','pdf','ppt','tiff','bmp','docx', 'xlsx', 'pptx','ps','odt','ods','odp','odg');

Additionally, I encountered problems uploading many larger pdfs since they are larger than the default php upload size. In ubuntu, this can be changed by modifying the php.ini file (likely located in /etc/php5/apache). Look for ‘upload_max_filesize’ and ‘post_max_size’ in order to change this to whatever size you like.


Of course being a CS student, I need to be able to add math equations into my wiki. The math formulas are entered using Latex which most CS grad students (and many undergrads) should know how to use. This one is in the Ubuntu repositories so it is easy to do:

sudo apt-get install mediawiki-math

Then you have to edit the LocalSettings.php file again (/etc/mediawiki) so that the wgUseTex flag is true:

$wgUseTeX = true;

Source Code – Syntax Highlighting

Again since I am a CS student, my wiki needs to be able to display source code easily in a readable way. For this I use the Ubuntu package manager again:

sudo apt-get install mediawiki-extensions-geshi

And edit the LocalSettings.php file (/etc/mediawiki) – For some reason, other instructions I have online have different paths and names for the plugin, so this will only work using the plugin from the repository. If you download it yourself directly, the name and location may be different:


Wiki Privacy

Lastly, as I previously mentioned the wiki is private (at least for now). To do this it is quite simple. Just paste this into the bottom of your LocalSettings.php file. (There are other variations on how private you can make the wiki, but if you want to do that, check out the official mediawiki page)

# Disable reading by anonymous users
# See:
$wgGroupPermissions['*']['read'] = false;

# But allow them to access the login page or else there will be no way to log in!
# NOTE: You also need to provide access here to the .css and .js files that the
# allowed pages attempt to load; otherwise, users will get errors on the page
# when they attempt to load it (IE will complain about the errors;
# FF will show them in its error console)
# [You also might want to add access to "Main Page", "Wikipedia:Help", etc.)
$wgWhitelistRead = array ("Special:Userlogin", "MediaWiki:Common.css",
"MediaWiki:Common.js", "MediaWiki:Monobook.css", "MediaWiki:Monobook.js", "-");

# Disable anonymous editing
$wgGroupPermissions['*']['edit'] = false;

# Prevent new user registrations except by sysops
$wgGroupPermissions['*']['createaccount'] = false;

DD-Wrt Micro on Linksys WRT54Gv6


Today on a whim I decided to pickup a Linksys WRT54Gv6 wireless router from Staples. It was on sale for $20 off and looked like the last one there. I’ve been looking at the DD-Wrt software for some time since I have an old junky wireless router buried in my closet at home. Unfortunately the old router I have cannot run DD-Wrt so when I saw this one on sale I thought I’d give the WRT54G a try.


Tutorial: Ns-2.33 (and nam) on Ubuntu 8.04 (Hardy Heron)

Since I have been working with ns2 for the last few months in preparation for my thesis I have decided to write a guide on how to install the most recent version of ns2 on the most recent version of ubuntu (at the time of this writing, Monday June 9th, 2008).

I have found many people already who have had difficulty setting it up so maybe this will be of some help to someone. For this tutorial I am assuming you have installed the most recent version of Ubuntu (8.04). (At the time of writing)