Difference between revisions of "Mediawiki"

From Univention Wiki

Jump to: navigation, search
(Keyword angepasst.)
(Translation into English)
Line 1: Line 1:
 
{{Version|UCS=3.0}}
 
{{Version|UCS=3.0}}
= Installation =
+
This article describes on how to install and configure the mediawiki software in a UCS environment.
  
In UCS 3.0 befinden sich die Mediawiki Pakete im [[UCS 3.0#Debian Basis|unmaintained]] Repository. Dieses muss über die Univention Config Registry oder eine entsprechende Richtlinie eingebunden werden:
+
== Installation ==
univention-config-registry set repository/online/unmaintained="yes"
 
  
Danach können Mediawiki und das LDAP Plug-in installiert werden.
+
The mediawiki package is provided in the UCS 3.0 unmaintained repository:
univention-install mediawiki mediawiki-extensions-base mediawiki-extensions-ldapauth
+
<pre>
 +
univention-config-registry set repository/online/unmaintained="yes"
 +
</pre>
 +
 
 +
Now Mediawiki and the LDAP-plugins can be installed:
 +
<pre>
 +
univention-install mediawiki mediawiki-extensions-base mediawiki-extensions-ldapauth
 +
</pre>
 +
 
 +
== 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:
 +
<pre>
 +
#Alias /mediawiki /var/lib/mediawiki
 +
</pre>
 +
 
 +
Alternatively a custom alias can be created:
 +
<pre>
 +
Alias /<my-alias> /var/lib/mediawiki
 +
</pre>
 +
 
 +
Now the initial configuration must be run. This can be done by opening the configuration interface in a webbrowser:
 +
<pre>
 +
http://<fqdn>/mediawiki/config/index.php
 +
</pre>
 +
 
 +
respectively
 +
<pre>
 +
http://<fqdn>/<my-alias>/config/index.php
 +
</pre>
  
= Konfiguration =
+
Finally, the configuration file must be moved:
 +
<pre>
 +
mv /var/lib/mediawiki/config/LocalSettings.php /etc/mediawiki
 +
</pre>
  
Danach muss in der Datei
+
The mediawiki can now be accessed by opening:
/etc/mediawiki/apache.conf
+
<pre>
das Komentarzeichen (#) aus der Zeile
+
http://<fqdn>/mediawiki/  
#Alias /mediawiki /var/lib/mediawiki
+
</pre>
entfernt werden. Alternative kann auch ein eigener Alias angelegt werden, unter dem Mediawiki erscheinen soll:
 
Alias /<my-alias> /var/lib/mediawiki
 
  
Danach muss die Erstkonfiguration durchgeführt werden unter:
+
respectively
http://<fqdn>/mediawiki/config/index.php
+
<pre>
bzw:
+
http://<fqdn>/<my-alias>/
http://<fqdn>/<my-alias>/config/index.php
+
</pre>
  
Jetzt muss die Konfigurationsdatei noch verschoben werden:
+
=== LDAP authetication ===
mv /var/lib/mediawiki/config/LocalSettings.php /etc/mediawiki
 
Danach steht MediaWiki unter
 
http://<fqdn>/mediawiki/
 
bzw.
 
http://<fqdn>/<my-alias>/
 
bereit.
 
  
= LDAP Authentifizierung =
+
To enable the LDAP authentication with mediawiki, the following link must be set:
 +
<pre>
 +
ln -s /etc/mediawiki-extensions/extensions-available/LdapAuthentication.php /etc/mediawiki-extensions/extensions-enabled/LdapAuthentication.php
 +
</pre>
  
Zur Aktivierung der LDAP Authentifizierung muss folgender Link gesetzt werden:
+
Now, the plugin must be configured. This is done by adding the settings to the standard mediawiki configuration files:
ln -s /etc/mediawiki-extensions/extensions-available/LdapAuthentication.php /etc/mediawiki-extensions/extensions-enabled/LdapAuthentication.php
+
<pre>
 +
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
 +
</pre>
  
Danach muss die Konfiguration für das Plugin noch geschrieben werden. Die folgenden Befehle hängen diese an die Standardkonfiguration an:
+
After reloading the mediawiki in your browser, any domain user can log into the mediawiki using the known username and password.
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
 
  
Nach einem Reload des Browsers sollte ein Login mit dem normalen Benutzernamen und Password möglich sein.
+
=== 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:
  
= Einbinden in die Übersichtsseite =
 
Damit die Wikiseite auf der Übersichtsseite eingetragen wird muss die Datei
 
/etc/univention/templates/files/var/www/ucs-overview/de.html.d/21Wiki.html
 
mit folgendem Inhalt angelegt werden.
 
 
<pre>
 
<pre>
 
<tr>
 
<tr>
Line 63: Line 91:
 
</pre>
 
</pre>
  
Gleiches gilt für die englische Seite
+
Additionally, the info file '''/etc/univention/templates/info/mediawiki.info''' must be created and filled with the following content:
/etc/univention/templates/files/var/www/ucs-overview/en.html.d/21Wiki.html
+
<pre>
 
 
Weiterhin muss eine Infodatei
 
/etc/univention/templates/info/mediawiki.info
 
angelegt werden, die die eben erstellte Datei in UCR einbindet.
 
<pre>  
 
 
Type: subfile
 
Type: subfile
 
Multifile: var/www/ucs-overview/de.html
 
Multifile: var/www/ucs-overview/de.html
Line 80: Line 103:
  
 
[[Category:Howtos]]
 
[[Category:Howtos]]
 +
[[Category:EN]]

Revision as of 12:42, 29 May 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 authetication

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