MediaWiki: Difference between revisions

From Bibliotheca Anonoma
No edit summary
No edit summary
Line 1: Line 1:
The Bibliotheca Anonoma Wiki is configured quite uniquely for our needs. It uses Amazon AWS with S3 and Cloudfront for hosting, and has a load of interesting extensions.
The Bibliotheca Anonoma Wiki is configured quite uniquely for our needs. It uses an Nginx web server, PostgreSQL DB on an SSD, and images on a RAID for hosting, and has a load of interesting extensions.


* Web Server - Nginx
* PHP Engine - PHP FPM
* PHP Engine - PHP FPM
* Database - PostgreSQL
* Database - PostgreSQL
Line 14: Line 15:
=== Infrastructure ===
=== Infrastructure ===


* [[mediawikiwiki:Extension:AWS|Amazon AWS]] - The tools needed to support AWS S3 upload.
* [[mediawikiwiki:Extension:AWS|Amazon AWS]] - The tools needed to support AWS S3 upload, if you are using it. If you use this you should probably bundle it with Amazon Cloudfront, their load balancing service.


=== Mods ===
=== Mods ===
Line 36: Line 37:
** Downside is that it doesn't allow files to be uploaded normally through Mediawiki. Nope.
** Downside is that it doesn't allow files to be uploaded normally through Mediawiki. Nope.
-->
-->
=== Security ===
* [[mediawikiwiki:Extension:OATHAuth]] - Uses TOTP one time codes along with your password for two factor authentication, in case one of them is compromised. You can run TOTP through Authy or Google Authenticator using any smartphone (or even dumbphone if it has Java applets).


== Widgets ==
== Widgets ==
Line 42: Line 47:


* [http://www.mediawikiwidgets.org/SoundCloud SoundCloud] - Allows us to embed SoundCloud music for playing,
* [http://www.mediawikiwidgets.org/SoundCloud SoundCloud] - Allows us to embed SoundCloud music for playing,
== Installation Instructions ==
The Bibliotheca Anonoma Wiki has a unique installation process. Generally, you follow the guides here, but mix them both together.
=== General ===
Follow this guide first, but then the distribution specific ones for further guidance and dependencies.
https://www.mediawiki.org/wiki/Manual:Installing_MediaWiki
=== Debian ===
For Debian, although there exists a Mediawiki package in jessie-backports, it installs Apache and MySQL, which is not what we use. But if you're fine with that, go ahead.
https://www.mediawiki.org/wiki/Manual:Running_MediaWiki_on_Debian_or_Ubuntu
== Wiki Backup ==
Even the archivists must back themselves up periodically, especially on such a crucial wiki. But if we fall behind, you can also run the [https://github.com/WikiTeam/wikiteam/wiki/Tutorial WikiTeam scripts] to generate a full text and full image backup.
=== Text Backup ===
In the case of our wiki, database dumps are only done for internal use because they are specific to a certain version of Mediawiki, our unique extensions, and contain sensitive data such as password hashes. It may not even be helpful to our successors, since we use PostgreSQL and MySQL/MariaDB may be easier to set up with Mediawiki.
Instead, we provide XML dumps which are version independent and free to all, and are periodically uploaded to the Internet Archive. These can also be made by the general public via [[Special:Export]], which is what the WikiTeam scripts do.
Use [[mediawikiwiki:Manual:DumpBackup.php|DumpBackup.php]] to create XML dumps on the server itself. Then 7zip them up.
These XML dumps can then be imported through [[mediawikiwiki:Manual:Importing_XML_dumps|these procedures.]]
=== Image Backup ===
Image backup can be easily done from our end, so we commit to doing so, that way you don't have to.
Use [[mediawikiwiki:Manual:ImportImages.php|ImportImages.php]] to dump them to a folder. Then 7zip them up into the Wikiteam format along with the XML.

Revision as of 16:49, 2 December 2016

The Bibliotheca Anonoma Wiki is configured quite uniquely for our needs. It uses an Nginx web server, PostgreSQL DB on an SSD, and images on a RAID for hosting, and has a load of interesting extensions.

  • Web Server - Nginx
  • PHP Engine - PHP FPM
  • Database - PostgreSQL

PostgreSQL

PostgreSQL is used as our database for a number of reasons, from stability to compatibility with other apps to support for JSONB values.

However, it is clearly not the most popular choice of database for Mediawiki, so we do make some workarounds to support this unique use case. These mods are noted below.

Extensions

Infrastructure

  • Amazon AWS - The tools needed to support AWS S3 upload, if you are using it. If you use this you should probably bundle it with Amazon Cloudfront, their load balancing service.

Mods

  • Anonymous IP Hash - Halcy developed a mod for MediaWiki on tanasinn that hashes ips of anonymous users much like on 4chan's /b/ or 2channel.

Spam

  • SpamBlacklist - Comes with Mediawiki by default, and we've enabled it. However, it blocks a lot of good 4chan sources (naturally), so we've set up a whitelist as well.

Media

  • EmbedVideo - This embeds uploaded videos using the browser's own HTML5 <video> tag for embedding content (requires MP4 or webm). You can even embed from YouTube or NicoNico.

Security

  • mediawikiwiki:Extension:OATHAuth - Uses TOTP one time codes along with your password for two factor authentication, in case one of them is compromised. You can run TOTP through Authy or Google Authenticator using any smartphone (or even dumbphone if it has Java applets).

Widgets

Widgets are little bits of HTML which can be used as advanced templates.

  • SoundCloud - Allows us to embed SoundCloud music for playing,

Installation Instructions

The Bibliotheca Anonoma Wiki has a unique installation process. Generally, you follow the guides here, but mix them both together.

General

Follow this guide first, but then the distribution specific ones for further guidance and dependencies.

https://www.mediawiki.org/wiki/Manual:Installing_MediaWiki

Debian

For Debian, although there exists a Mediawiki package in jessie-backports, it installs Apache and MySQL, which is not what we use. But if you're fine with that, go ahead.

https://www.mediawiki.org/wiki/Manual:Running_MediaWiki_on_Debian_or_Ubuntu

Wiki Backup

Even the archivists must back themselves up periodically, especially on such a crucial wiki. But if we fall behind, you can also run the WikiTeam scripts to generate a full text and full image backup.

Text Backup

In the case of our wiki, database dumps are only done for internal use because they are specific to a certain version of Mediawiki, our unique extensions, and contain sensitive data such as password hashes. It may not even be helpful to our successors, since we use PostgreSQL and MySQL/MariaDB may be easier to set up with Mediawiki.

Instead, we provide XML dumps which are version independent and free to all, and are periodically uploaded to the Internet Archive. These can also be made by the general public via Special:Export, which is what the WikiTeam scripts do.

Use DumpBackup.php to create XML dumps on the server itself. Then 7zip them up.

These XML dumps can then be imported through these procedures.

Image Backup

Image backup can be easily done from our end, so we commit to doing so, that way you don't have to.

Use ImportImages.php to dump them to a folder. Then 7zip them up into the Wikiteam format along with the XML.