Methoden/Kundenwiki, MediaWiki - Full Service!   Firmen-Wikis   Content Management Systeme   Projektmanagement Tools   Sicherheit

Aus Sysdoc

Wechseln zu: Navigation, Suche

3.1 Anlegen eines neuen Kundenwikis

Die offizielle Dokumentation zur Installation der MediaWiki-Software ist extern auf www.mediawiki.org einsehbar. In jener Dokumentation finden sich unter anderem auch Hinweise auf zahlreiche administrative Wiki-Links/Features, die auf Anregung der X in den einzelnen Kundenwikis nicht expliziet ausgewiesen/für "Normal-User" abgeschaltet sind, um ein möglichst schlichtes/unkompliziertes Interface zu bieten- und bestimmte Vertraulichkeitsaspekte zu bedienen.

Im Folgenden wird hier stichwortartig auf die technischen Besonderheiten im Kontext der X-Knowledgebase eingegangen und eine durchnumerierte Liste von Arbeitsschritten illustriert mit Beispielen angeboten, um ein kundensprezifisches Wiki aufzusetzen.

In den Beispielen wird angenommen, dass für einen neuen Kunden der X namens Produktkunde ein Wiki eingerichtet werden soll. Hierbei werden Inhalte und Benutzerkonten des internem Wikis der X nach Absprache mit der jeweiligen X-Projektleitung selektiv übernommen.

1. Neue Subdomain für den Kunden im Apache Webserver einrichten

/srv/www/vhosts/x-knowledgecenter.com/conf/httpd.include:

<IfModule mod_ssl.c>
<VirtualHost xx.xx.xxx.xx:443>
	ServerName   produktkunde.x-knowledgecenter.com:443
    SuexecUserGroup         produktkunde psacln
	ServerAdmin  admin@x-knowledgecenter.com
	DocumentRoot /srv/www/vhosts/x-knowledgecenter.com/subdomains/produktkunde/httpsdocs
	CustomLog  /srv/www/vhosts/x-knowledgecenter.com/statistics/logs/access_ssl_log plesklog
	ErrorLog  /srv/www/vhosts/x-knowledgecenter.com/statistics/logs/error_log
	SecRuleInheritance On
    SSLEngine on
	SSLVerifyClient none
	  
    SSLCertificateFile /etc/ssl/crt/x-knowledgecenter.com.crt 
    SSLCertificateKeyFile /etc/ssl/crt/private.key 
    SSLCertificateChainFile /etc/ssl/crt/?.ca-bundle
   
    
    
   Alias /produktkundeII /srv/www/vhosts/x-knowledgecenter.com/subdomains/produktkunde/httpsdocs/index.php
   
    <Directory  /srv/www/vhosts/x-knowledgecenter.com/subdomains/produktkunde/httpsdocs>
	<IfModule sapi_apache2.c>
		php_admin_flag engine on
		php_admin_flag safe_mode off
		php_admin_value open_basedir "/srv/www/vhosts/x-knowledgecenter.com/subdomains/produktkunde/httpsdocs:/tmp:/srv/www/vhosts/x-knowledgecenter.com/subdomains/produktkunde/public"
	</IfModule>
	<IfModule mod_php5.c>
        php_admin_flag engine on
		php_admin_flag safe_mode off
		php_admin_value open_basedir "/srv/www/vhosts/x-knowledgecenter.com/subdomains/produktkunde/httpsdocs:/tmp:/srv/www/vhosts/x-knowledgecenter.com/subdomains/produktkunde/public"
	</IfModule>
		SSLRequireSSL
		Options -Includes -ExecCGI
	</Directory>
</VirtualHost>


</IfModule>

<VirtualHost xx.xx.xxx.xx:80>
	ServerName   produktkunde.x-knowledgecenter.com:80
	#SuexecUserGroup         produktkunde psacln
	ServerAdmin  admin@x-knowledgecenter.com
	DocumentRoot /srv/www/vhosts/x-knowledgecenter.com/subdomains/produktkunde/httpdocs
	CustomLog  /srv/www/vhosts/x-knowledgecenter.com/statistics/logs/access_log plesklog
	ErrorLog  /srv/www/vhosts/x-knowledgecenter.com/statistics/logs/error_log
	SecRuleInheritance On
    ScriptAlias  /cgi-bin/ /srv/www/vhosts/x-knowledgecenter.com/subdomains/produktkunde/cgi-bin/
	ScriptAlias  /mivavm /usr/bin/mivavm
	SetEnv MvCONFIG_DIR_MIVA /srv/www/vhosts/x-knowledgecenter.com/subdomains/produktkunde/httpdocs
	SetEnv MvCONFIG_DIR_DATA /srv/www/vhosts/x-knowledgecenter.com/subdomains/produktkunde/mivadata
	SetEnv MvCONFIG_DIR_CA /usr/share/miva/certs
	SetEnv MvCONFIG_LIBRARY /usr/lib/miva/config/env.so
	SetEnv MvCONFIG_DIR_BUILTIN /usr/lib/miva/builtins
	SetEnv MvCONFIG_DATABASE_MIVASQL /usr/lib/miva/databases/mivasql.so
	SetEnv MvCONFIG_SSL_OPENSSL /usr/lib/libssl.so.0.9.8
	SetEnv MvCONFIG_SSL_CRYPTO /usr/lib/libcrypto.so.0.9.8
	SetEnv MvCONFIG_COMMERCE_AuthorizeNet /usr/lib/miva/commerce/authnet.so
	SetEnv MvCONFIG_COMMERCE_CyberCash /usr/lib/miva/commerce/cybercash.so
	SetEnv MvCONFIG_COMMERCE_LinkPoint /usr/lib/miva/commerce/linkpoint.so
	SetEnv MvCONFIG_COMMERCE_ICS2 /usr/lib/miva/commerce/ics2.so
	SetEnv MvCONFIG_FLAGS_SECURITY 23
	AddType application/x-miva-compiled .mvc
	Action application/x-miva-compiled /mivavm
	<Directory /usr/bin>
		<Files mivavm>
			order allow,deny
			Allow from all
		</Files> 
	</Directory>
	<IfModule mod_ssl.c>
		SSLEngine off
	</IfModule>
	<Directory  /srv/www/vhosts/x-knowledgecenter.com/subdomains/produktkunde/httpdocs>
	<IfModule mod_perl.c>
	<Files ~ (\.pl$)>
		SetHandler perl-script
		PerlHandler ModPerl::Registry
		Options ExecCGI
		allow from all
		PerlSendHeader On
	</Files>
	</IfModule>
	<IfModule sapi_apache2.c>
		php_admin_flag engine on
		php_admin_flag safe_mode off
		php_admin_value open_basedir "/srv/www/vhosts/x-knowledgecenter.com/subdomains/produktkunde/httpdocs:/tmp:/srv/www/vhosts/x-knowledgecenter.com/subdomains/produktkunde/public"
	</IfModule>
	<IfModule mod_php5.c>
		php_admin_flag engine on
		php_admin_flag safe_mode off
		php_admin_value open_basedir "/srv/www/vhosts/x-knowledgecenter.com/subdomains/produktkunde/httpdocs:/tmp:/srv/www/vhosts/x-knowledgecenter.com/subdomains/produktkunde/public"
	</IfModule>
	<IfModule mod_fcgid.c>
		AddHandler fcgid-script .fcgi
		Options +FollowSymLinks +ExecCGI
	</IfModule>
		Options +Includes +ExecCGI
	</Directory>
</VirtualHost>

2. Neue MySQL-Datenbank für MediaWiki-Applikation mit dem Suffix _produktkunde anlegen

Bild:Db_anlegen.png

3.Neuen Datenbank-User für MediaWiki-Applikation mit Suffix _produktkunde anlegen

Bild:User_anlegen.png


4. DB-Tabellen mit Inhalten der initialen, internen Wiki-Installation in die neue Datenbank kopieren:

wikidb_internal >> wikidb_produktkunde

5. Programmlogik, HTML-Markup etc. eines schon existierenden Kunden-Wikis in neues Webverzeichnis kopieren (Unix Shell):

cp -rp /srv/www/vhosts/x-knowledgecenter.com/subdomains/anderer_produktkunde/*
/srv/www/vhosts/x-knowledgecenter.com/subdomains/produktkunde

6. "Config-Verzeichnis" aus einem der anderen Kundenwikis oder von einer lokaler Installation in das neue Kundenverzeichnis kopieren und Rechte setzen:

chmode 755 /subdomains/produktkunde/httpsdocs/config

7. Den Webserver neu starten (Unix Shell /etc/init.d/apache2 restart), /subdomains/produktkunde/httpsdocs/LocalSettings.php in LocalSettings.php_old umbenennen und Wiki-Installscript (mit neuen DB-Daten) im Browser durchlaufen lassen

8. LocalSettings.php aus schon existierenden Kundenwiki in das neue Web-Verzeichnis /subdomains/produktkunde/httpsdocs/ kopieren und alle Konfigurationseinträge an den neuen Kunden anpassen:

<?php

# This file was automatically generated by the MediaWiki installer.
# If you make manual changes, please keep track in case you need to
# recreate them later.
#
# See includes/DefaultSettings.php for all configurable settings
# and their default values, but don't forget to make changes in _this_
# file, not there.

# If you customize your file layout, set $IP to the directory that contains
# the other MediaWiki files. It will be used as a base to locate files.
if( defined( 'MW_INSTALL_PATH' ) ) {
	$IP = MW_INSTALL_PATH;
} else {
	$IP = dirname( __FILE__ );
}

$path = array( $IP, "$IP/includes", "$IP/languages" );
set_include_path( implode( PATH_SEPARATOR, $path ) . PATH_SEPARATOR . get_include_path() );

require_once( "$IP/includes/DefaultSettings.php" );

# If PHP's memory limit is very low, some operations may fail.
# ini_set( 'memory_limit', '20M' );

if ( $wgCommandLineMode ) {
	if ( isset( $_SERVER ) && array_key_exists( 'REQUEST_METHOD', $_SERVER ) ) {
		die( "This script must be run from the command line\n" );
	}
}
## Uncomment this to disable output compression
# $wgDisableOutputCompression = true;
if(ereg( "/produktkundeII/Start",$_SERVER['REQUEST_URI'])): # hint nur docu
    header("Location: https://produktkunde.x-knowledgecenter.com/produktkundeII/Anwenderdokumentation_VI");
    #echo $_SERVER['REQUEST_URI'];
endif;

$wgSitename         = "produktkunde";

## The URL base path to the directory containing the wiki;
## defaults for all runtime URL paths are based off of this.
$wgScriptPath       = "";
$wgScriptExtension  = ".php";
$wgArticlePath      = "/produktkundeII/$1";


## For more information on customizing the URLs please see:
## http://www.mediawiki.org/wiki/Manual:Short_URL

$wgEnableEmail      = true;
$wgEnableUserEmail  = true;

$wgEmergencyContact = "admin@x-knowledgecenter.com";
$wgPasswordSender = "admin@x-knowledgecenter.com";

## For a detailed description of the following switches see
## http://www.mediawiki.org/wiki/Extension:Email_notification 
## and http://www.mediawiki.org/wiki/Extension:Email_notification
## There are many more options for fine tuning available see
## /includes/DefaultSettings.php
## UPO means: this is also a user preference option
$wgEnotifUserTalk = true; # UPO
$wgEnotifWatchlist = true; # UPO
$wgEmailAuthentication = true;

$wgDBtype           = "mysql";
$wgDBserver         = "localhost";
$wgDBname           = "wikidb_produktkunde";
$wgDBuser           = "wikiuser_produktkunde";
$wgDBpassword       = "xxx";

# MySQL specific settings
#$wgDBprefix         = "kunde1_";

# MySQL table options to use during installation or update
$wgDBTableOptions   = "TYPE=InnoDB";

# Experimental charset support for MySQL 4.1/5.0.
$wgDBmysql5 = false;

# Postgres specific settings
$wgDBport           = "5432";
$wgDBmwschema       = "mediawiki";
$wgDBts2schema      = "public";

## Shared memory settings
$wgMainCacheType = CACHE_NONE;
$wgMemCachedServers = array();

## To enable image uploads, make sure the 'images' directory
## is writable, then set this to true:
$wgEnableUploads       = false;
$wgUseImageMagick = false;
$wgImageMagickConvertCommand = "/usr/bin/convert";

## If you want to use image uploads under safe mode,
## create the directories images/archive, images/thumb and
## images/temp, and make them all writable. Then uncomment
## this, if it's not already uncommented:
# $wgHashedUploadDirectory = false;

## If you have the appropriate support software installed
## you can enable inline LaTeX equations:
$wgUseTeX           = false;

$wgLocalInterwiki   = $wgSitename;

$wgLanguageCode = "de";

$wgProxyKey = "fa7f213eefcd8eea1d2fc21b2ff40bdac21f9eb15c4f097eedf6e5ce62bce089";

## Default skin: you can change the default skin. Use the internal symbolic
## names, ie 'standard', 'nostalgia', 'cologneblue', 'monobook':
$wgDefaultSkin = 'monobook';

## For attaching licensing metadata to pages, and displaying an
## appropriate copyright notice / icon. GNU Free Documentation
## License and Creative Commons licenses are supported so far.
# $wgEnableCreativeCommonsRdf = true;
$wgRightsPage = ""; # Set to the title of a wiki page that describes your license/copyright
$wgRightsUrl = "";
$wgRightsText = "";
$wgRightsIcon = "";
# $wgRightsCode = ""; # Not yet used

$wgDiff3 = "/usr/bin/diff3";

# When you make changes to this configuration file, this will make
# sure that cached pages are cleared.
$configdate = gmdate( 'YmdHis', @filemtime( __FILE__ ) );
$wgCacheEpoch = max( $wgCacheEpoch, $configdate );


#------------------

# This snippet prevents new registrations from anonymous users
# (Sysops can still create user accounts)
$wgGroupPermissions['*']['createaccount'] = false;

# This snippet prevents editing from anonymous users
$wgGroupPermissions['*']['edit'] = false;

# This allows users to view the main page and log in. Without this line, no one can log in.
#$wgWhitelistRead = array( "Start", "Spezial:Userlogin", "-", "MediaWiki:Monobook.css" );
$wgWhitelistRead = array("Spezial:Userlogin", "-", "MediaWiki:Monobook.css" );

# This disallows anonymous users to view pages not in whitelist.
$wgGroupPermissions['*']['read'] = false;
# Allow access to maintenance scripts run on the command line:
if ($wgCommandLineMode) {
        $wgGroupPermissions['*']['read'] = true;
};

require_once( "extensions/PslUserrights.php" ); 

require_once( "extensions/ParserFunctions.php" ); 


/****************************************************************
 * Additional namespaces.
 * PLEASE  NOTE: Once you delete a namespace, the pages in that namespace will
 * no longer be accessible. If you rename it, then you can access them through
 * the new namespace name.
 *
 * Custom namespaces should start at 100 to avoid conflicting with standard
 * namespaces, and should always follow the even/odd main/talk pattern.
 */
$wgExtraNamespaces =
	array(
	      100 => "Func",
	      101 => "Func_Diskussion",
	      102 => "AD",
	      103 => "AD_Diskussion",
	      104 => "VD",
	      105 => "VD_Diskussion",
	      106 => "VUD",
	      107 => "VUD_Diskussion",
	      108 => "VNCE",
	      109 => "VNCE_Diskussion",
	      110 => "VNDB",
	      111 => "VNDB_Diskussion"
	      );


# http://www.mediawiki.org/wiki/Help:%24wgNamespacesWithSubpages
# Which namespaces should support subpages?
$wgNamespacesWithSubpages = 
$wgNamespacesWithSubpages = array(
        NS_MAIN           => true,
        NS_TALK           => true,
        NS_USER           => true,
        NS_USER_TALK      => true,
        NS_PROJECT_TALK   => true,
        NS_IMAGE_TALK     => true,
        NS_MEDIAWIKI_TALK => true,
        NS_TEMPLATE_TALK  => true,
        NS_HELP_TALK      => true,
        NS_CATEGORY_TALK  => true,
        101               => true,
        102               => true,
        103               => true,
        104               => true,
        105               => true,
        106               => true,
        107               => true,
        108               => true,
        109               => true,
        110               => true,
        111               => true
);


$wgNamespacesToBeSearchedDefault = array(
	NS_MAIN           => true,
	100               => true,
	102               => true,
	104               => true,
	106               => true,
	110               => true
);


## To enable image uploads, make sure the 'images' directory
## is writable, then set this to true:
$wgEnableUploads		= true;
$wgUseImageResize		= true;
$wgUseImageMagick = false;
$wgImageMagickConvertCommand = "/ImageMagick/convert";

## If you want to use image uploads under safe mode,
## create the directories images/archive, images/thumb and
## images/temp, and make them all writable. Then uncomment
## this, if it's not already uncommented:
$wgHashedUploadDirectory = false;

# This is the list of preferred extensions for uploading files. Uploading
# files with extensions not in this list will trigger a warning.
$wgFileExtensions = array( 'png', 'gif', 'jpg', 'jpeg', 'ogg', 'zip', 'pdf', 'doc', 'vnd', 'vnz', 'xls', 'ppt', 'exe');

# Files with these extensions will never be allowed as uploads.
$wgFileBlacklist = array(
        # HTML may contain cookie-stealing JavaScript and web bugs
        'html', 'htm', 'htaccess',
        # PHP scripts may execute arbitrary code on the server
        'php', 'phtml', 'php3', 'php4', 'php5', 'phps',
        # Other types that may be interpreted by some servers
        'shtml', 'jhtml', 'pl', 'py'
        # May contain harmful executables for Windows victims
        #, 'exe', 'scr', 'dll', 'msi', 'vbs', 'bat', 'com', 'pif', 'cmd', 'vxd', 'cpl' 
	);

# This is a flag to determine whether or not to check file extensions on
# upload.
$wgCheckFileExtensions = false;

# If this is turned off, users may override the warning for files not
# covered by $wgFileExtensions.
$wgStrictFileExtensions = false;

# Warn if uploaded files are larger than this
$wgUploadSizeWarning = 770000000;

$wgUploadPath       = "$wgScriptPath/img_auth.php";
$wgUploadDirectory  = "/srv/www/vhosts/x-knowledgecenter.com/subdomains/produktkunde/public";
$wgVerifyMimeType = false;

9. Logo anpassen:

/subdomains/produktkunde/httpsdocs/skins/common/images/wiki.png

10. Ggf. aktualisierte Language-Datei einspielen:

/srv/www/vhosts/x-knowledgecenter.com/subdomains/produktkunde/httpsdocs/languages/messages/MessagesDe.php

11. Hartcodierte Programmteile, im Besonderen REDIRECTS an neuen Kunden anpassen (siehe 2.1.3 MediaWiki)

12. Überflüssige Navigations-Links entfernen (Bearbeitungsschritt innerhalb des Wiki-GUI):

 
http://produktkunde.x-knowledgecenter.com/index.php?title=MediaWiki:Sidebar&action=edit

13. Nicht kundenrelevante Wiki-Kategorieen über SQL-Statement löschen:

delete from categorylinks WHERE ( 
cl_to!='ADI' and 
cl_to!='Data Transports' and 
cl_to!='Glossary' and 
cl_to!='Table' and 
cl_to!='VIBD' and 
cl_to!='Formeln' and 
cl_to!='Benutzer- und Rechteverwaltung')

Sollte sichergestellt sein, dass sämtliche übernommenen Seiteninhalte die kundenrelevant sind eine Kategorie besitzen, könnte im Anschluss zusätzlich jede Seite gelöscht werden die keine Kategorie besitzt; wobei hier die sogenannten page_namespaces zu beachten wären- um nicht essentiell wichtige, applikationsrelevante Inhalte zu löschen.

DELETE FROM page
  WHERE NOT EXISTS (SELECT * FROM categorylinks
                    WHERE page.page_id = categorylinks.cl_from) and page.page_namespace [...];

Um zu verhindern das sehr versierte Wiki-Nutzer/Kunden nach nicht verlinkten oder kategorisierten Inhalten "fahnden" und speziellere administrative Wiki-Features nutzen (Special Pages), ist für die X-Knowledgebase eine "handgemachte" Extension implementiert worden, in welcher neben einer erweiterten Rechte/Gruppen- Verwaltung spezielle Wiki-Seiten/Features per black- und whitelist aktiviert, respektive deaktivert werden. Die Erweiterung wird in der Konfigurationsdatei Localsettings.php referenziert (siehe auch Punkt 8 dieser Liste). Die Funktionen der Erweiterung werden in 3.6 Nutzer- und Rechteverwaltung behandelt.

/extensions/PslUserRights.php

14. Ggf. 2 Wiki-Kategorien (z.B. Projektdokumentation, Updates und Auslieferung) mit je einem Dummy-Artikel anlegen.

15. Inhaltsverzeichnis/ HTML-Markup mit den Gliederungspunkten 1 bis 4 aus existierenden Kundenwiki in das neue Wiki kopieren

16. Die Doku-Seiten des neuen Kundenwikis der Kategorie RE-VC Programmdokumentation zuordnen (Subitems der Hauptitems 1 bis 4 des Inhaltsverzeichnises; jeweils einzeln Copy & Paste z.B. aus "anderer_produktkunde")

[[Category:RE-VC Programmdokumentation|Anwenderdoku REVC]]

17. In Abstimmung mit der jeweiligen Projektleitung neue Kundenmitarbeiter als Wiki-Nutzer anlegen und ggf. nicht berechtigte Wiki-Nutzer der Usergroup Vollsperrung zuordnen. Detailierte Angaben über die Nutzer- und Rechteverwaltung entnehmen Sie Bitte dem Abschnitt 3.6 Nutzer- und Rechteverwaltung.

Die User Alfons Schnittelbecker, Werner Breit und Gerhard Schlittenkötter sind keine X-Mitarbeiter, sie arbeiten in einem Partner-Unternehmen. Deshalb haben sie Zugriff auf das Internal-Wiki, jedoch nicht automatisch in allen Kunden-Wikis. (Ausnahmen sind möglich, z.B. bei Infuls). Dieses sollte bei der Neueinrichtung von Wikis sichergestellt sein.

18. MySQL-Datenbank-Tabelle "recentchanges" leeren

19. Die MediaWiki-Installation des neuen Kunden im Browser gründlich überprüfen

Persönliche Werkzeuge
Werkzeuge