I have a scattered brain. So scattered that it’s essence seeps out into my every day life, into my actual organizational techniques, and before I know it, my notes are strewn across 3 small notebooks, a journal, several post-it notes, flashcards, hand drawn diagrams, and a whiteboard. Despite my attempts to herd my ideas and thoughts into a single fenced-in area, they always find a way to tear down the enclosure and escape.
The Optimized Journey (~1 hour)
This is the path I would have taken if I knew what I know now…
Download Raspbian on a New Pi
Starting fresh is always a safe bet but of course it’s not always possible. This will be the longest part of the process.
Follow the Tutorial to a T
I used a tutorial from willbeone and ran into issues when I tried using different versions of PHP and mediawiki. If you’re just looking to get mediawiki installed and running, use version 1.30.0 and PHP 7.0.
The tutorial has you do most of the build on a Windows machine connected to your Pi via a secure shell. Do this.
The Hitchhiker’s Journey (4 Hours)
This is the path I actually took to create a Raspberry Pi Hosted Mediawiki…
Google Raspberry Pi Mediawiki
If it’s not clear to you at this point in your life that Google is always a fair first step, you may be stunted.
It turns out there are several tutorials on installing Mediawiki on a Raspberry Pi that uses the Raspbian OS so we’re off.
Choose A Tutorial
The link above provides 2 tutorials (which I later find out do not contain the same steps). I decided to go with the tutorial from willbeone-techtips.co.za. The .za domain is South African for any uncultured folks out there.
The steps provided here were pretty straight forward so I banged ’em out right quick.
Test the Connection
After connecting to my Pi via PuTTY, I tried navigating to the Mediawiki location on my Windows desktop. Unfortunately, no dice. The dice just weren’t there…I remember setting them down, mentally noting the dice position, leaving with confidence that the dice would remain. But no…no dice.
Error: Connection Refused
A few short Stack Overflow references later and I was no closer to having an answer…or dice.
Panic Mode – Combine Tutorials
I’m not proud of this but I was not in the mood to do my own research. I ended up referencing the other tutorial and attempting to follow all the steps from the beginning. In the trevorappleton tutorial, however, Mediawiki is installed using the apt-get install mediawiki command and I’m pretty sure this screwed everything up.
In the willbeone tutorial, he uses the wget command to unzip a .tar file. I didn’t totally think through the effects of doing this differently at the time and I’m not going to overthink it now. It’s just bad. Things get put in different locations and now I presumably have duplicates of different files on my pi. Bad.
Attempt to Fix the Combo
I didn’t totally document this process so I can only say it didn’t work. After discovering that the Raspberry Pi does not have a factory reset option, and being unwilling to search through files to figure out what shouldn’t be there, I decided to reflash my SD card and start fresh.
SD Card is Write Protected
I’m fast forwarding through this because the memories are painful. In the end, I needed to update the registry files on my laptop so I could actually flash the SD card and upload the Raspbian OS.
With the card now write-unprotected, I could copy the Raspbian software from my downloads folder to the SD card. I was under the impression this process required an etching software but you can actually just download the NOOBS zip from the Raspberry Pi site, unzip the contents, and copy them to the SD card.
I used NOOBS v3.0.1 since I didn’t want to wait an hour to download the newest version.
Wait an Hour for the Pi Software to be Updated
Okay, should have seen this one coming. When the Pi first boots up, it updates whatever software you are using and because I chose v3.0.1 instead of the most recent v3.2.1 I paid the price in time.
Download the newest Mediawiki release
The tutorial used the 1.30.0 version of Mediawiki even though the most recent version at the time of writing is 1.34.0. I used the following command in my Downloads file to install the program:
Getting closer, lets goooooooo
MediaWiki 1.34 internal error
JeSuS MarY and JoSePh. Mediawiki 1.34 requires at least PHP version 7.2.9 and when you download PHP using sudo apt-get install on the Pi, you get version 7.0.
I used sudo rm -rf ./mediawiki/* to remove all files in the mediawiki folder and then re-downloaded mediawiki 1.30.0.
- -r = recursive, meaning it will delete all files in the immediate folder and all subdirectories
- -f = force, meaning linux won’t prompt you when errors occur or files aren’t found
After completing all of the setup steps, everything seemed to be working right.
Start Creating the Wiki
Creating a wiki is actually super fun and the more html and CSS you know, the wilder your wiki can be.
I’ll be using the wiki for some of my own personal notes and references in the future and who knows…maybe one day I’ll release it to the world.
Well, that was fun.