Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Private wiki farm with OpenID login

Fetching latest commit…

Cannot retrieve the latest commit at this time

about add screenshot
css ui update
debian
help update screen shots, add "groups pending" shot
js include list of visible inputs in generic ajax submit
.gitignore
COPYING debianize
DataTables-1.7.1.zip Add group-invite/disinvite table to "manage wiki" form
DefaultFarmSettings.php fix preg delimiters in DefaultFarmSettings
GeSHiHighlight.php add GeSHiHighlight
Makefile add textile release tarball (thresholdstate has been offline for a lo…
README
README-ami
README-buildpackage
README-extensions
README-performance
README-restore
SimpleTable.php add SimpleTable extension
WikifarmAuthPlugin.php use wfSetupSession() instead of User::SetupSession() in newer MW
WikifarmDriver.php
WikifarmPageMachine.php
adminhelp.textile add admin-only backups: wikifarm state only, and all wikis
awstats.00.conf remove hardcoded host name from awstats config templates
awstats.all.conf remove hardcoded host name from awstats config templates
claim-wiki-by-password.php import realname and email address when claiming credentials
commonist-0.3.43-wikifarm-1.15.patch get session id from commonist password field instead of env var
commonist-0.3.43-wikifarm-1.15.patch.sh add commonist 0.3.43 with openid auth patch
commonist-0.3.43.zip add commonist 0.3.43 with openid auth patch
config.php.example
favicon.ico use wyss logo
help.textile update screen shots, add "groups pending" shot
index.php
initialize_wikis_db.php
install
login-bg.gif use local copy of login-bg.gif to prevent "insecure items" warning
login.php
logout.php redirect straight to login page after logout, instead of bouncing thr…
make_admin_user.php debianize
mysql-utf8.cnf character set fixes
php-apc-patch add php-apc patch
serverlogo.png use wyss logo
setup
style.css add "group editable" feature. refs #767
textile-2.0.0-php-5.2.4.patch add textile patch
textile-2.0.0.tar.gz add textile release tarball (thresholdstate has been offline for a lo…
wikifarm-apache2.conf.in debianize
wikifarm-auth.pl add Help tab, some bug fixes and display tweaks
wikifarm-backup.sh debianize
wikifarm-create-wiki debianize
wikifarm-log-split.pl print all accesses to default log file, not just no-particular-wiki a…
wikifarm-php.ini
wikifarm-sudo-disable debianize
wikifarm-sudo-enable debianize
wikifarm-template-save fix up ownership/permissions in "save template wiki" script
wikifarm-update-config.pl
wikifarm-update-stats.sh remove hardcoded host name from awstats config templates
README
===================================================================
Copyright 2010 President and Fellows of Harvard College

Authors:
Tom Clegg <tom@clinicalfuture.com>
Jer Ratcliffe <jer@clinicalfuture.com>

This file is part of wikifarm.

Wikifarm is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License version 2 as
published by the Free Software Foundation.

Wikifarm is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
General Public License for more details.

You should have received a copy of the GNU General Public License
along with wikifarm.  If not, see <http://www.gnu.org/licenses/>.
===================================================================

NOTE: This file documents how to set up a wikifarm on a plain Linux
system, like the Ubuntu Lucid image available on AWS.

An even quicker method is to use a pre-built AMI -- see README-ami.

===================================================================

Installing on AWS
=================

Create instance

* use ami-714ba518
* Select a suitable private key, so you can log in
* Select a security policy with ports 22, 80, and 443 open

Update your OS

  sudo aptitude update && sudo aptitude full-upgrade

Add the wikifarm repository to your apt sources

  wget -q -O- http://apt.clinicalfuture.com/clinicalfuture-key.gpg | sudo apt-key add -
  echo deb http://apt.clinicalfuture.com/wikifarm lucid main | sudo tee /etc/apt/sources.list.d/wikifarm.list
  sudo apt-get update

Install and enable wikifarm

  sudo apt-get install wikifarm
  sudo a2dissite default
  sudo a2ensite wikifarm
  sudo /etc/init.d/apache2 restart

Change your default mysql character set to utf8

  sudo cp /etc/wikifarm/mysql-utf8.cnf /etc/mysql/conf.d/utf8.cnf
  sudo /etc/init.d/mysql restart

Create an administrator account

* Visit http://{your.wiki.farm}
* Log in with your OpenID
* Copy your OpenID from the "my account" screen
* Run:
 /etc/wikifarm/make_admin_user.php http://YOUR.OPENID.HERE
* Provide your email address and real name on the "my account" page
* Click "Save changes"

Create the base wiki config and database

* Visit http://{your.wiki.farm}/00 and click "set up the wiki".  Fill in the form:
* wiki name: Wiki (won't be used)
* random password for WikiSysop (won't be used)
* database name "wikidb00"
* db username "wikiuser"
* db password "wikipass"
* yes, use superuser account.
* provide the MySQL root password you used when installing mysql-server.
* Click "Install MediaWiki!"

Copy the config file to the template wiki and lock it down

  /etc/wikifarm/wikifarm-template-save

Configure your server so it can send email notifications

* If you are using AWS, use a smarthost or attach an elastic IP address to your instance.
* Example:
  sudo dpkg-reconfigure exim4-config

Fix PHP session garbage collection

* Run /usr/lib/php5/maxlifetime
* If it reports "24" it is not reading the wikifarm.ini.
* Edit /usr/lib/php5/maxlifetime as follows:
  -for ini in /etc/php5/*/php.ini; do
  +for ini in /etc/php5/*/*.ini; do

(Optional) install mediawiki-math

  sudo apt-get install mediawiki-math

(Optional) create an AMI

* Delete any OpenID accounts you created during testing/setup:
  sqlite3 /var/lib/wikifarm/db/wikis.db 'delete from users; delete from usergroups;'
* Delete some history, cache, etc.
  sudo apt-get clean
  rm -rf ~/.*_history ~/.cache ~/.sudo_as*
  unset HISTFILE
  exit
* Shut down (not terminate) your instance
* Create an AMI from your instance (takes ~ 1/2 hour)
* Start an instance using the new AMI and test it (see README-ami)

Turn off deleteOnTermination attribute on your EBS volume

* Make sure your workstation is >= lucid
* Determine your instance id, EBS volume id, and root filesystem device
  (perhaps using "ec2-describe-instances -v")
* Turn off deleteOnTermination flag:
  ec2-modify-instance-attribute i-ef5eb785 -b /dev/sda1=vol-9a1980f3:false -v

(Optional) switch to SSL

* Create/obtain a signed site certificate
* Enable ssl:
  sudo a2enmod ssl
  sudo /etc/init.d/apache2 restart

Ensure your users always access your server with the same hostname.

* Some OpenID providers (including Google) do not supply the same
  OpenID URL when the same user signs in to different OpenID consumer
  sites.  This means your users must always access your wikifarm using
  the same domain name (i.e., only one of "http://example.com",
  "https://secure.example.com", "http://1.2.3.4").  The following code
  can be used in /etc/apache2/sites-available/wikifarm to accomplish
  this.

    <Limit GET HEAD>
      RewriteCond %{HTTP_HOST} !your.canonical.host.name
      RewriteRule (.*) https://your.canonical.host.name$1 [R,L]
    </Limit>

Create wiki number 01 for yourself

* Visit http://{your.wiki.farm}.
* Click "My Wikis"
* Complete the form
  (Name this wiki "docs" so the link to "/docs/Wiki_Tutorial" on the
  Help tab will work)
* Click "Create new wiki"
* You have Sysop privileges in your new wiki, so you can protect
  pages, edit the MediaWiki:Sidebar page, etc.

(Optional) install other mediawiki extensions

* see README-extensions

(Optional) improve performance

* see README-performance

(Optional) customize site appearance

* Set site slogain in /etc/wikifarm/config.php
  (see /etc/wikifarm/config.php.example)
* Install logo graphic in /var/lib/wikifarm/www/serverlogo.png
  (64 pixels high for best results)
* Install favicon in /var/lib/wikifarm/www/favicon.ico
  (16x16 pixels for best results)
Something went wrong with that request. Please try again.