Installing MediaWiki on Gandi AI

Ever heard of a small thing called Wikipedia? This is the wiki application used to run it.

Chances are you already know your way around the application quite well! If you think this is the kind of wiki you would need for your own website, follow this tutorial to see how to install it!


Creating a dedicated database for your wiki

It's wise to have a database dedicated to your wiki. Let's go crazy, and call it “wiki”.

If you don't (yet) know how to go about this, please read this tutorial.


Creating a directory for your wiki

You have a choice here. For “neatness'” sake, such applications are generally placed in a folder within the www sub-domain (www.example.com/wiki) or in a specific sub-domain of its own (wiki.example.com).

If you prefer to have your store in a folder

Easy! Just make sure the you create a specific folder for the store (as in www.example.com/wiki)

If you prefer to have a sub-domain specifically dedicated to your store, such as wiki.example.com

Two things to do:

  • Configure your server for this sub-domain, as explained in this tutorial.
  • Configure your sub-domain to point to the server you have just configured, as explained in this tutorial.

This is the option we will be using in the rest of the tutorial.


Fetching Wikipedia

To begin with, we need to download it. At the time of writing, the latest version of the beta was 1.11.1.

Nothing beats the official site to get the initial compressed file. I therefore recommend this link.

Now that you've downloaded the file onto your favorite hard drive, decompress it. You now have a folder (let's rename it wiki) containing all of the Wikipedia files.

Launch your favorite FTP client (we recommend FileZilla) and log in as admin onto your server. Then, open the folder corresponding to the VirtualHost you had initially defined.

In our example, the path of the FTP would therefore be:

/srv/d_my-gandai-ai/www/wiki.example.com/htdocs

…that is, unless you've changed the initial configuration of the web files. If that's the case, however, I'm assuming you knew what you were doing. :)

At this stage, we can upload the wiki files onto your server.

  • If you created a wiki.example.com kind of virtual host, you will want the wiki to come up as the front page (i.e. not within a folder in the sub-domain) and you should therefore upload the content of the wiki folder into the htdocs folder of your sub-domain.
  • If you're not a fan of sub-domains and prefer a good old example.com/wiki, then you need to upload the complete folder into htdocs (or another folder if you want).


Preparing the Wikipedia files

For Wikipedia to configure properly, a specific folder will require specific rights. In most cases, to change these rights with your FTP client, all you need to do is right-click on the file concerned and chose the right term in the menu (could be Rights, CHMOD, Properties…). Supposing you were using FileZilla, this is what you should do:

Right-click the concerned file and select “File Attributes…”. The window that has just opened gives you two different methods to change the file rights: boxes to tick and numeric values.

The point of the tutorial not being to teach the numeric values of rights in UNIX, let's just say you can simply replace the numeric value by 777.

The folder that will need its rights changed is:

Config

Installing MediaWiki

Open your web browser and go to MediaWiki's install folder (config/index.php) on your server. In our case, this would be:

http://wiki.example.com/config/index.php

Welcome to MediaWiki's installation page! I presume the page layout will remind you of something…:)

Checking environment...

In this section will be a listed a series of info which should look like the following screenshot:

But the line we're really interested in is the last one. Indeed, you should be seeing a beautiful green line - Environment checked. You can install MediaWiki. - indicating that everything is OK for the installation to begin. Let's go!

Site config

Wiki name

Preferably a short name, without punctuation. Like, uh… wikipedia, only that's taken.
The wiki name is a commitment: it will come up in different places around the interface, so make sure you pick a suitable name.

Contact e-mail

The e-mail provided here will appear

  • on error messages which could arise
  • as the sender of any e-mails for password reminders
  • as the sender of any notification e-mail

Language

Choose the language you want your wiki to be running in. Regardless of the language you select, however, the rest of the installation will take place in English.

Copyright/license

Choose a license. Or don't.
For more info, check the Creative Commons website, where you'll find all information about the kind of license you may need for the content of your wiki.

Admin username

Create the wiki's general administrator account. You'll then need to provide a password, and confirm it. The password cannot be the same thing as the user name, but that would be a terrible idea anyway.
The best passwords are those that make no sense, that are made up of upper case, lower case characters and numbers, and that you'll be able to remember.

Shared memory caching

Choose No caching, unless you know how to install an object caching system on your server. Who knows, maybe I'll write a tutorial on that one of these days. :)

E-mail, e-mail notification and authentication setup

E-mail features (global)

Choose Disabled if you don't want e-mail functions (password reminders, notifications, etc) to be active.
If you want all or some mail functions activated, on the other hand, you'll need to configure a mail server to relay the e-mails. The simplest thing to do then is to create a free Gandi Mail account! :)

User-to-user e-mail

To activate e-mails between wiki users only.

E-mail notification about changes

Activate this option if you want to allow users to choose to be notified about certain page modifications only.

Enabled for changes to user discussion pages only will only send e-mails about just that.

E-mail address authentication

Activate this option if you want an e-mail confirmation (with activation link) to be sent to users when they create an account on the wiki.

Database config

Database type

You don't have a choice, leave MySQL ticked. :)

Database host

You can leave the 'localhost' value by default.

Database name

The database name as defined at the beginning. In our case, it was called wiki.

DB username

The user name you had created along with the database.

DB password

Finally, the password associated to the database, which you'll then need to confirm.

Superuser account

Don't tick this option: it's not great security-wise. Therefore, you can also ignore the two following fields (Superuser name and Superuser password) as well.

MySQL specific options

Database table prefix

So as to avoid tables squashing other tables in your MySQL server, it is wise to give a prefix to the tables created by MediaWiki.
Choose to write mw_ by default.

Storage Engine

You can leave InnoDB by default.

Database character set

You can leave Backwards-compatible UTF-8 by default.


Then, click Install MediaWiki!.


Confirmation

At the bottom of the page, you should see a gorgeous “Installation Succesful!” message. Congratulations!

To finish, you'll need to open your FTP client again to move a file, /config/Localsettings.php, to its parent directory.

In your FTP client, when you are in MediaWiki's config folder, you can usually just drag the icon for the Localsettings.php file to the folder icon called .. (this indeed designates the parent directory):

Once this is done, delete the config folder with its two remaining pages.

Then, using your web browser, go to MediaWiki's directory on your server. You're standing in front of a brand new wiki!

For any additional info, please check out the official MediaWiki documentation.
Enjoy!


Last modified: 10/18/2012 at 20:15 by Thomas S. (Gandi)