Difference between revisions of "Mediawiki"

From Univention Wiki

Jump to: navigation, search
(Translation into English)
m (Fix typo.)
Line 55: Line 55:
 
</pre>
 
</pre>
  
=== LDAP authetication ===
+
=== LDAP authentication ===
  
 
To enable the LDAP authentication with mediawiki, the following link must be set:
 
To enable the LDAP authentication with mediawiki, the following link must be set:

Revision as of 07:50, 2 July 2012

Produktlogo UCS Version 3.0

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

Installation

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

Configuration

The configuration of mediawiki to work with UCS is split into three parts: making mediawiki accessable via the Apache webserver, the LDAP authentication and 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

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

http://<fqdn>/mediawiki/config/index.php

respectively

http://<fqdn>/<my-alias>/config/index.php

Finally, the configuration file must be moved:

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

The mediawiki can now be accessed by opening:

http://<fqdn>/mediawiki/ 

respectively

http://<fqdn>/<my-alias>/

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:

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

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