Manual:Installing MediaWiki on SourceForge.net

=Introduction=

Let's say that :
 * your project is named "myproject"
 * your login on sourceforge is "username"

You want to install mediawiki-1.13.1 on your sourceforge web site.

=Installation=

Database creation
Log in on sourceforge, go to "Admin/shell/DB/Web", click on "Manage Project Databases" and create the users (readonly, readwrite and admin)

For example :
 * m12345ro:passworddb
 * m12345rw:passworddb
 * m12345admin:passworddb

Create the database m12345_wikidb on https://mysql-m.sourceforge.net/ (https://mysql-[your project character].sourceforge.net/)

Copy mediawiki on your site
Copy content of mediawiki-1.13.1 to sftp://username,myproject@web.sourceforge.net/home/groups/m/my/myproject/htdocs/wiki

Do not copy the images folder.

Create a symbolic link for sessions
PHP sessions needs special cares on SF.net servers as SF.net hosts a server farm and not a single server. If you use command line on linux, this means :
 * 1) sftp username,myproject@web.sourceforge.net:/home/groups/m/my/myproject/htdocs/wiki
 * 2) mkdir /home/groups/m/my/myproject/persistent/sessions
 * 3) symlink /home/groups/m/my/myproject/persistent/sessions /home/groups/m/my/myproject/htdocs/wiki/sessions

Change the rights of /home/groups/m/my/myproject/persistent/sessions (a+rwx)

Create a symbolic link for images
To enable image uploads, the first step is to ensure that the images directory is writable. As with the sessions directory, this is done by creating a writeable directory in the /home/groups/m/my/myproject/persistent directory and create a symbolic link to this directory :


 * 1) sftp username,myproject@web.sourceforge.net:/home/groups/m/my/myproject/htdocs/wiki
 * 2) mkdir /home/groups/m/my/myproject/persistent/images
 * 3) symlink /home/groups/m/my/myproject/persistent/images /home/groups/m/my/myproject/htdocs/wiki/images

Copy the content of mediawiki-1.13.1/images to /home/groups/m/my/myproject/htdocs/wiki/images

Change the rights of /home/groups/m/my/myproject/htdocs/wiki/images (a+rwx)

Modify index.php
Edit /home/groups/m/my/myproject/htdocs/wiki/config/index.php and comment :

/* if( !is_writable( "." ) ) {	dieout( " Can't write config file, aborting

In order to configure the wiki you have to make the config subdirectory writable by the web server. Once configuration is done you'll move the created LocalSettings.php to the parent directory, and for added safety you can then remove the config subdirectory entirely.

To make the directory writable on a Unix/Linux system:

cd /path/to/wiki chmod a+w config

Afterwards retry to start the setup. " );

}



Configure mediawiki
Go to http://myproject.sourceforge.net/wiki/

* Wiki name:MyProject * Contact e-mail: username@users.sourceforge.net * Admin username : WikiSysop * Password : mypassword * Shared memory caching: CACHE_ACCEL * E-mail (general): disabled * mysql: mysql-m * Database name: m12345_wikidb * DB username : m12345admin * DB password: passworddb

The result configuration will be displayed. Copy it to sftp://username,myproject@web.sourceforge.net/home/groups/m/my/myproject/htdocs/wiki/LocalSettings.php

Remove config folder

Sessions
Add after ini_set in LocalSettings.php : session_save_path("/home/groups/m/my/myproject/htdocs/wiki/sessions/");

=Optional configuration=

Sourceforge logo
Modify in wiki/includes/Skin.php : function getPoweredBy { global $wgStylePath; $url = htmlspecialchars( "$wgStylePath/common/images/poweredby_mediawiki_88x31.png" ); $sf = ''; $img = ''.$sf; return $img; }

Enabling upload
You then need to change a setting in LocalSettings.php to enable upload : $wgEnableUploads = true;