Tutorial: Install MediaWiki on FreeNAS
This is a step by step tutorial on how to go from “spare computer” to NAS w/MediaWiki for home.
Let’s get all our prerequisites together first: A copy of freeNAS (www.freenas.org), a burnable CDROM, and a burner.
Burn FreeNAS onto your cdrom, and boot FreeNAS from the CDROM.
FreeNAS is quite easy to configure and setup – so I won’t cover it here.
Once you have a running FreeNAS setup, you must enable the webserver.
For simplicity, I changed my managment inteface to run on https (port 443), and my wiki page is the default http (port 80). To do this you can easily go to “System -> General” on the FreeNAS gui, then under WebGUI change the “Protocol” to HTTPS and the Port to 443.
Enable webserver under “Services -> Webserver” and put it’s “Document root” somewhere useful. I put mine on my default public drive.
Now I need a user to login to FreeNAS on the command prompt. My default user can do this by setting the “Shell access” in the “Access -> Users -> Edit” menus.
Also note that I am part of the “Admin” group, which allows me to run “su” to become root.
Now, open up an SSH session to the FreeNAS server and become root. Your root password is the same one for the “admin” GUI.
Go to http://www.mediawiki.org and download the latest version of MediaWiki. I did it with “fetch” on my command prompt.
Then decompress it: (tar -vxzf mediawiki-1.15.0.tar.gz &&mv mediawiki-1.15.0/* . && rm -rf mediawiki-1.15.0)
Then browse to your mediawiki page (it would be the root address of your NAS server).
Fill out the questions that MediaWiki asks; but in “database config” you must configure a database and add a db to the “SQLite data directory”. I used a directory that cannot be browsed to on the web.
Then you should get a screen telling you that the installation was sucessful; next you move the “config/LocalSettings.php” file to the web-root. and change ownership of all the
web files. (mv config/LocalSettings.php . && chown -R www *)
Now that that’s all configured, you can remove you “config” directory (if you’re making it external. )