Difference between revisions of "Mediawiki"

From Univention Wiki

Jump to: navigation, search
Line 31: Line 31:
Alias /<my-alias> /var/lib/mediawiki
Alias /<my-alias> /var/lib/mediawiki
Afterwards, please restart the Apache webserver:
/etc/init.d/apache2 restart

Revision as of 13:48, 3 April 2013

Produktlogo UCS Version 3.0

This article describes how to install and configure the mediawiki software in a UCS environment.


The mediawiki package is provided in the UCS 3.0 unmaintained repository:

univention-config-registry set repository/online/unmaintained="yes"

Now Mediawiki and the LDAP-plugins can be installed:

univention-install mediawiki mediawiki-extensions-base mediawiki-extensions-ldapauth


The configuration of mediawiki including the cooperation with UCS is split into three parts:

  • making mediawiki accessable via the Apache webserver
  • enabling LDAP authentication
  • adding a mediawiki link to the UCS overview page

Configuration of the Apache webserver

In the file /etc/mediawiki/apache.conf the following line must be uncommented:

#Alias /mediawiki /var/lib/mediawiki

Alternatively a custom alias can be created:

Alias /<my-alias> /var/lib/mediawiki

Afterwards, please restart the Apache webserver:

/etc/init.d/apache2 restart

Now the initial configuration must be run. This can be done by opening the configuration interface in a webbrowser:




Finally, the configuration file must be moved:

mv /var/lib/mediawiki/config/LocalSettings.php /etc/mediawiki

The mediawiki can now be accessed by opening:




LDAP authentication

To enable the LDAP authentication with mediawiki, the following link must be set:

ln -s /etc/mediawiki-extensions/extensions-available/LdapAuthentication.php /etc/mediawiki-extensions/extensions-enabled/LdapAuthentication.php

Now, the plugin must be configured. This is done by adding the settings to the standard mediawiki configuration files:

echo "\$wgAuth = new LdapAuthenticationPlugin();" >> /etc/mediawiki/LocalSettings.php
echo "\$wgLDAPDomainNames = array('$(ucr get domainname)');" >> /etc/mediawiki/LocalSettings.php
echo "\$wgLDAPSearchStrings = array( '$(ucr get domainname)' => 'uid=USER-NAME,cn=users,$(ucr get ldap/base)' );" >> /etc/mediawiki/LocalSettings.php
echo "\$wgLDAPEncryptionType = array('$(ucr get domainname)' => 'ssl');" >> /etc/mediawiki/LocalSettings.php
echo "\$wgLDAPPreferences = array('$(ucr get domainname)' => array( "email" => "mailPrimaryAddress", "realname" => "displayName", "nickname" => "uid"));" >> /etc/mediawiki/LocalSettings.php
echo "\$wgLDAPBaseDNs = array('$(ucr get domainname)' => '$(ucr get ldap/base)');" >> /etc/mediawiki/LocalSettings.php
echo "\$wgLDAPServerNames = array('$(ucr get domainname)' => '$(ucr get ldap/master):7636');" >> /etc/mediawiki/LocalSettings.php

After reloading the mediawiki in your browser, any domain user can log into the mediawiki using the known username and password.

Including mediawiki in the UCS overview page

To include a link to the mediawiki into the UCS overviewpage, the files /etc/univention/templates/files/var/www/ucs-overview/de.html.d/21Wiki.html and /etc/univention/templates/files/var/www/ucs-overview/en.html.d/21Wiki.html must be filled with the following:

<td class="overview">
<a href="../univention-management-console/">
<img src="../icon/about.png" alt="Mediawiki" border="0" />
<td class="overview"><a href="../mediawiki/">Mediawiki</a></td>
<td class="overview">Mediawiki auf @%@hostname@%@</td>

Additionally, the info file /etc/univention/templates/info/mediawiki.info must be created and filled with the following content:

Type: subfile
Multifile: var/www/ucs-overview/de.html
Subfile: var/www/ucs-overview/de.html.d/21Wiki.html

Type: subfile
Multifile: var/www/ucs-overview/en.html
Subfile: var/www/ucs-overview/en.html.d/21Wiki.html
Personal tools