Mediawiki installation on SourceForge

From JGlade

Under construction

Contents

Introduction

I wrote this because the available information, about Mediawiki installation on SourceForge, that you can find googling is not completely accurated.

This article asumes that you have administrator rights over your project. If this is not the case you should request those rights from the project's administrator.

mediawiki-sf script will be introduced to automate the task.

Required steps

  1. Download Mediawiki software (supported versions are 1.5.* and 1.6.7)
  2. Download mediawiki-sf script
  3. Upload the software to your SourceForge's home directory
  4. Create and configure the SourceForge porject database
  5. Run the mediawiki-sf script
  6. Configure Mediawiki using the provided web interface
  7. Customize Mediawiki interface (logo, main page, etc.)

Downloading the required software

Mediawiki

Download Mediawiki locally to your machine not to SourceForge shell server because outbounds connections are explicitily forbiden. Do it from Mediawiki official download site [1], select the latest stable version.

In the case of this article the version selected is mediawiki-1.6.7 (previous version was based on mediawiki-1.5.*).

When the download is finished you can then copy it to your home directory in the SourceForge shell server using scp or ftp.

mediawiki-sf

mediawiki-sf is a shell script that automates the process of installing Mediawiki on SourceForge.

Again, download it locally to your machine from the official site [2], alternativelly the latest development version can be downloaded from the Subversion repository at https://jglade.svn.sourceforge.net/svnroot/jglade/trunk/mediawiki-sf/, and then copy it to your SourceForge's home directory and change the execution persmission on this file.

[sf-server]$ chmod a+x mediawiki-sf

Run the mediawiki-sf script

sh mediawiki-sf

(script must be in htdocs-directory, mediawiki directory must be in htdocs directory and named mediawiki)

This script will do this list of required tasks:

  • Create persistent information directory
  • Modify Mediawiki installation to suit this environment
  • Add session support
  • Add SourceForge logo (next release)

Note: If you get an error :

 /tmp/dialog: Permission denied 

This means you are using an older mediawiki-sf version, 0.2 resolve this issue (Thanks to Diego Torres Milano for help)

Newer versions are identified by its Subversion Revision tag, for example $Revision: 4$.

Image:Note.pngNote:

Starting with mediawiki-sf $Revision: 4$ Mediawiki 1.6.* (i.e: 1.6.7) is supported and was tested by the Gnome Terminal Applet project.

Problems with 1.6.x (solved in $Revision: 4$)

This wonderful script was failing on mediawiki-1.6.3 until I did:

 cp -r /home/groups/m/my/myproject/htdocs/mediawiki-1.6.3 /tmp/persistent/myproject

It was still reporting "Problem Patching Files." with culprits being:

 patching file config/index.php
 Hunk #1 FAILED at 113.
 Hunk #2 FAILED at 1114.
 Hunk #3 FAILED at 1220.
 3 out of 3 hunks FAILED -- saving rejects to file config/index.php.rej

So now this error appears when writing to database:

 Fatal error: Call to undefined function: memsess_key() in
 /home/groups/m/my/myproject/htdocs/mediawiki-1.6.3/includes/User.php on line 1695

Which I will investigate and report back here after some sleep :)

Unlucky?

If the script doesn't work for some reason, you'll have to tweak things by hand.

Note that in some cases when you've ran the script two times or more unsuccessfully, the index.php.orig file in the config directory is not the original file anymore (it's a copy of the file patched in the first run of the script). So after trying to run the script a few times, you should start with a fresh installation of mediawiki, before trying the method described at mediawiki.org.

As a precaution it would be a good idea to copy the files in the mediawiki directory to a directory called 'mwbackup' (or anything but mediawiki something) for later use, BEFORE running the script at all. Just in case.

SourceForge projects

This is the know list of SourceForge projects using mediawiki-sf

And a lot more... Please add your project to the list.

External links

Sponsored by: