|
|
Line 1: |
Line 1: |
| ==Useful functionality== | | ==Backup database.== |
| Category | | DATABASE=mediawiki ; mysqldump --database ${DATABASE} --single-transaction | gzip > ${DATABASE}.${HOSTNAME}.$(date '+%Y-%m-%d_%H-%M-%S').sql.gz |
| Attributes. | | ==Truncate recentchanges.== |
| Meta tags. | | mysql -e "TRUNCATE TABLE mediawiki.recentchanges ;" |
| | ==Remove history== |
| | php maintenance/run.php deleteOldRevisions.php --delete |
| | php maintenance/run.php deleteArchivedRevisions.php --delete |
| | ==Make changes take effect== |
| | php maintenance/run.php update.php |
| | php maintenance/run.php runJobs.php |
|
| |
|
| ==Installation==
| |
| yum -y install php-eaccelerator php-mysql
| |
|
| |
| ==Useful links.==
| |
|
| |
| Which version and which extensions.
| |
| http://www.mediawiki.org/wiki/Special:Version
| |
|
| |
| Frequently Asked Questions.
| |
| http://www.mediawiki.org/wiki/Manual:FAQ
| |
|
| |
| Create templates.
| |
| http://www.mediawiki.org/wiki/Help:Templates
| |
|
| |
| Grant permission.
| |
| http://anden.ongame.com/wiki/index.php/Special:UserRights
| |
|
| |
| Change starting page.
| |
| http://www.halfface.se/wiki/index.php/MediaWiki:Mainpage
| |
|
| |
| ==Enable uploads.==
| |
| # Enable uploads
| |
| $wgEnableUploads = true;
| |
|
| |
| ==Installation Lucene.==
| |
|
| |
| Download binaries from:
| |
| http://www.mediawiki.org/wiki/Extension:Lucene-search
| |
| Put it in some directory and configure the following options.
| |
| Edit lsearch.conf file:
| |
|
| |
| * MWConfig.global - put here the URL of global configuration file (see below), e.g. file:///etc/lsearch-global.conf
| |
| * MWConfig.lib - put here the local path to lib directory, e.g. /usr/local/search/ls2/lib
| |
| * Indexes.path - base path where you want the deamon to store the indexes, e.g. /usr/local/search/indexes
| |
| * Localization.url - url to MediaWiki message files, e.g. file:///var/www/html/wiki/phase3/languages/messages
| |
| * Logging.logconfig - local path to log4j configuration file, e.g. /etc/lsearch.log4j
| |
| lsearch.conf
| |
|
| |
| MWConfig.global=file:///opt/ls2/lsearch-global.conf
| |
| MWConfig.lib=/opt/ls2/lib
| |
| Indexes.path=/opt/ls2/indexes
| |
| Localization.url=file:///var/www/html/wiki/languages/messages
| |
| Logging.logconfig=/opt/ls2/mwsearch.log4j
| |
|
| |
|
| |
| lsearch-global.conf
| |
| Edit lsearch-global.conf file. Each of these sections needs to be updated to use the correct host name and database.
| |
| [Database]
| |
| mediawiki : (single) (language,en) (warmup,10)
| |
| [Search-Group]
| |
| anden.ongame.com : mediawiki
| |
| [Index]
| |
| anden.ongame.com : mediawiki
| |
| [Index-Path]
| |
| <default> : /mwsearch
| |
| [OAI]
| |
| [Properties]
| |
| KeywordScoring.suffix=wiki wikilucene wikidev
| |
| ExactCase.suffix=wiktionary wikilucene
| |
|
| |
| [Namespace-Prefix]
| |
| all : <all>
| |
|
| |
|
| |
| Build the index.
| |
| To be able to use dumpBackup.php you need to configure AdminSettings.php.
| |
| #!/bin/bash
| |
| LUCENEPATH=/opt/ls2/
| |
| WIKIPATH="/var/www/html/wiki/"
| |
| WIKIdumpBackup="/opt/ls2/mediawiki.xml"
| |
| #exec 1> /dev/null
| |
| #exec 2> /dev/null
| |
| php ${WIKIPATH}/maintenance/dumpBackup.php --current --quiet > $WIKIdumpBackup
| |
| java -cp ${LUCENEPATH}/LuceneSearch.jar org.wikimedia.lsearch.importer.Importer -s $WIKIdumpBackup mediawiki
| |
|
| |
| Update index regulary. (cron)
| |
| # Update index for Lucene search engine.
| |
| 0,15,30,45 * * * * /opt/ls2/cron
| |
|
| |
| Integrate to mediawiki
| |
| download the following extension: http://www.mediawiki.org/wiki/Extension:MWSearch
| |
| Add the following to your:
| |
| Add the following to your LocalSettings.php:
| |
|
| |
| $wgSearchType = 'LuceneSearch';
| |
| $wgLuceneHost = 'localhost';
| |
| $wgLucenePort = 8123;
| |
| require_once("extensions/MWSearch/MWSearch.php");
| |
|
| |
|
| |
| ==LDAP login==
| |
| Download extension: http://www.mediawiki.org/wiki/Extension:LDAP_Authentication
| |
|
| |
| # Enable LDAP authentification.
| |
| require_once( "extensions/LdapAuthentication.php" );
| |
| $wgAuth = new LdapAuthenticationPlugin();
| |
| $wgLDAPDomainNames = array( "ONGAME" );
| |
| $wgLDAPServerNames = array( "ONGAME"=>"ad.ongame.com" );
| |
| $wgLDAPSearchStrings = array( "ONGAME"=>"USER-NAME@ongame.com" );
| |
| $wgLDAPEncryptionType = array("ONGAME"=>"clear");
| |
| $wgLDAPUseSSL = false;
| |
| $wgLDAPUseLocal = false;
| |
| $wgMinimalPasswordLength = 1;
| |
|
| |
| # Multiple AD domains
| |
| require_once 'extensions/LdapAuthentication.php';
| |
| $wgAuth = new LdapAuthenticationPlugin();
| |
| $wgLDAPDomainNames = array( 'ONGAME', 'BAW' );
| |
| $wgLDAPServerNames = array( 'ONGAME' => 'ad.ongame.com', 'BAW' => '10.10.1.13' );
| |
| $wgLDAPSearchStrings = array( 'ONGAME' => 'ONGAME\\USER-NAME', 'BAW' => 'BAW\\USER-NAME' );
| |
| $wgLDAPEncryptionType = array( 'ONGAME' => 'clear', 'BAW' => 'clear' );
| |
| $wgLDAPUseSSL = false;
| |
| $wgLDAPUseLocal = false;
| |
| $wgMinimalPasswordLength = 1;
| |
|
| |
| ==wiked installation==
| |
| Download and put under extensions.
| |
| http://www.mediawiki.org/wiki/Extension:Gadgets
| |
|
| |
| Update your own Gadget-wikEd.js.
| |
| http://anden.ongame.com/wiki/index.php/MediaWiki:Gadget-wikEd.js
| |
| Description of gadget.
| |
| http://anden.ongame.com/wiki/index.php/MediaWiki:Gadget-wikEd
| |
| Which gadgets should be installed
| |
| http://anden.ongame.com/wiki/index.php/MediaWiki:Gadgets-definition
| |
| * wikEd|wikEd.js
| |
|
| |
| ==Terminology==
| |
| http://www.mediawiki.org/wiki/Extension:Terminology
| |
| Create extensions/Terminology/Terminology.php
| |
|
| |
| # Enable Terminology.
| |
| require_once( "extensions/Terminology/Terminology.php" );
| |
|
| |
| Update the following side with explained words.
| |
| http://anden.ongame.com/wiki/index.php/Terminology
| |
| Support single line definitions
| |
| ;ITOG:IT Operation Games
| |
| And multi-line definitions
| |
| ;HTTP
| |
| :HyperText Transfer Protocol
| |
|
| |
| ==Allow other file types.==
| |
| Change the following array to contain the files you want.
| |
| $wgFileExtensions = array( 'png', 'gif', 'jpg', 'jpeg', 'pdf', 'txt' );
| |
| $wgFileExtensions = array( 'png', 'gif', 'jpg', 'jpeg', 'pdf', 'txt' );
| |
|
| |
| ==Change favicon.ico==
| |
|
| |
| ==Search suggestion==
| |
| # Suggestion in search.
| |
| $wgEnableMWSuggest = true;
| |
| [[Category:Applications]] | | [[Category:Applications]] |
| [[Category:Unix]] | | [[Category:Unix]] |
Backup database.
DATABASE=mediawiki ; mysqldump --database ${DATABASE} --single-transaction | gzip > ${DATABASE}.${HOSTNAME}.$(date '+%Y-%m-%d_%H-%M-%S').sql.gz
Truncate recentchanges.
mysql -e "TRUNCATE TABLE mediawiki.recentchanges ;"
Remove history
php maintenance/run.php deleteOldRevisions.php --delete
php maintenance/run.php deleteArchivedRevisions.php --delete
Make changes take effect
php maintenance/run.php update.php
php maintenance/run.php runJobs.php