Services/wiki

From popdata
Jump to: navigation, search

MediaWiki setup on Cartier2

  • /usr/share/mediawiki/ contains files and links to /var/lib/mediawiki/ for AdminSettings.php LocalSettings.php
  • /var/lib/mediawiki/ contains many links to /usr/share/mediawiki/ and vice-versa
  • .../AdminSettings.php -> /etc/mediawiki/AdminSettings.php
  • /home/www/farm/ contains various wiki site contents

Create a new Wiki

  • login to cartier and become root
  • cd /home/www/farm
  • cp -a template newwiki
  • with a web browser go to https://wiki.popdata.bc.ca/newwiki
  • select Set up the wiki and fill in the form
    • name: newwiki
    • email: jim@phlo.ubc.ca
    • admin username: wiki-admin
    • admin password: ...
    • db password: ...
    • db password: ...
    • Database table prefix: newwiki_
    • superuser password: -
    • Install mediawiki
  • cd newwiki
  • mv config/LocalSettings.php .
  • chmod 400 LocalSettings.php
  • change LocalSettings to reflect and permission (be default Main_Page is viewable by anyone, otherwise you must log in)
  • go to: https://wiki.popdata.bc.ca/newwiki
  • add any users to the ldap group newwiki-wiki in ou=groups

Upgrade to New MediaWiki Version

We get the backported debian packages from http://www.backports.org lenny-backports/main

  • install package
  • cp -a /var/lib/mediawiki /home/www/farm/template
  • cp -a /home/www/farm/<wiki> /home/www/farm/bak/<wiki>
  • cd /home/www/farm/<wiki>
  • \rm *; \rm -rf config extensions
  • cp -a /home/www/farm/template .
  • cp -a ../bak/<wiki>/LocalSettings.php .
  • cp -a ../bak/<wiki>/LocalSettings.php /etc/mediawiki
  • php /usr/share/mediawiki/maintenance/update.php
  • try it out

Miscellaneous settings

login timeout: http://www.mediawiki.org/wiki/Manual_talk:Configuration_settings suggests "session.gc_maxlifetime" (default 1440s = 24m) in /etc/php5/apache2/php.ini or "php_value session.gc_maxlifetime 1440" in VirtualHost definition in /etc/apache2/sites-available/popdata-wiki [...] Others have mentioned the session.gc_maxlifetime setting. When session garbage collection occurs, the garbage collector will delete any session data that has not been accessed in longer than session.gc_maxlifetime seconds. To set the time-to-live for the session cookie, call session_set_cookie_params() or define the session.cookie_lifetime PHP setting. If this setting is greater than session.gc_maxlifetime, you should increase session.gc_maxlifetime to a value greater than or equal to the cookie lifetime to ensure that your sessions won't expire.

That php.ini on Cartier refers to /etc/cron.d/php5 , which (Debian customization) uses /script usr/lib/php5/maxlifetime to pick the largest number for session.gc_maxlifetime from /etc/php5/*/php.ini and uses that to purge session files.