How to configure a replica of this Wiki/fr

Aus i2pwiki.mk16.de
Zur Navigation springen Zur Suche springen

<languages />

Introduction[Bearbeiten]

Pourquoi faire une copie de ce Wiki ? Pourquoi demander aux autres de faire une copie de ce Wiki ? Pourquoi aider à copier et distribuer des copies de ce projet ?

La réponse courte: pour survivre!

La plus longue: pour survivre!

Installer Mediawiki[Bearbeiten]

Un mini-guide pour installer MediaWiki sur un système basé sur Debian.<ref>https://www.mediawiki.org/wiki/Manual:Installation_guide</ref>

$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install apache2 mysql-server php5 php5-mysql libapache2-mod-php5
$ sudo apt-get install php-apc php5-intl imagemagick phpmyadmin vsftpd php5-cli

Téléchargez et renseignez la première configuration de mediawiki
Remplacez x par les chiffres de la dernière version de MediaWiki

$ cd Downloads
$ wget http://releases.wikimedia.org/mediawiki/1.xx/mediawiki-1.xx.x.tar.gz
$ tar -xvzf /pathtofile/mediawiki-*.tar.gz
$ sudo mkdir /var/lib/mediawiki
$ sudo mv mediawiki-*/* /var/lib/mediawiki
$ cd /var/www/html
$ sudo ln -s /var/lib/mediawiki mediawiki

En option, vous pouvez configurer d'autres variables

$ sudo nano /etc/php5/apache2/php.ini
upload_max_filesize = 2M
memory_limit = 128M

Le fichier de configuration d'I2PWiki

# This file was automatically generated by the MediaWiki 1.25.2
# 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.
#
# Further documentation for configuration settings may be found at:
# https://www.mediawiki.org/wiki/Manual:Configuration_settings
error_reporting(E_ALL);
ini_set("log_errors", 1);
ini_set("error_log", "/tmp/wiki-error.log");
# Protect against web entry

if ( !defined( 'MEDIAWIKI' ) ) {
	exit;
}

# Enables use of WikiEditor by default but still allows users to disable it in preferences
$wgDefaultUserOptions['usebetatoolbar'] = 1;

# Enables link and table wizards by default but still allows users to disable them in preferences
$wgDefaultUserOptions['usebetatoolbar-cgd'] = 1;

# Displays the Preview and Changes tabs
$wgDefaultUserOptions['wikieditor-preview'] = 1;

# Displays the Publish and Cancel buttons on the top right side
$wgDefaultUserOptions['wikieditor-publish'] = 1;

$wgShowIPinHeader = false;
$wgPutIPinRC = false;
## Uncomment this to disable output compression
# $wgDisableOutputCompression = true;

$wgSitename = "I2PWiki";
## The URL base path to the directory containing the wiki;
## defaults for all runtime URL paths are based off of this.
## For more information on customizing the URLs
## (like /w/index.php/Page_title to /wiki/Page_title) please see:
## https://www.mediawiki.org/wiki/Manual:Short_URL
$wgScriptPath = "";
$wgScriptExtension = ".php";
//$wgArticlePath      = "/wiki/$1";
$wgUsePathInfo      = false;

//$wgFavicon = "$wgScriptPath/favicon.ico";

$actions = array( 'edit', 'watch', 'unwatch', 'delete','revert', 'rollback',
  'protect', 'unprotect', 'markpatrolled', 'render', 'submit', 'history', 'purge', 'info',
  'page', 'translate' );

/*foreach ( $actions as $action ) { 
  $wgActionPaths[$action] = "/wiki/$action/$1";
}*/

## The protocol and server name to use in fully-qualified URLs
$wgServer = "http://i2pwiki.i2p";
#"http://nrbnshsndzb6homcipymkkngngw4s6twediqottzqdfyvrvjw3pq.b32.i2p";

## The relative URL path to the skins directory
$wgStylePath = "$wgScriptPath/skins";
$wgResourceBasePath = $wgScriptPath;

## The relative URL path to the logo.  Make sure you change this from the default,
## or else you'll overwrite your logo when you upgrade!
$wgLogo = "$wgResourceBasePath/resources/assets/logo_wiki.png";

## UPO means: this is also a user preference option

$wgEnableEmail = false;
$wgEnableUserEmail = false; # UPO

$wgEmergencyContact = "apache@127.0.0.1";
$wgPasswordSender = "apache@127.0.0.1";

$wgEnotifUserTalk = false; # UPO
$wgEnotifWatchlist = false; # UPO
$wgEmailAuthentication = true;

## Database settings
$wgDBtype = "mysql";
$wgDBserver = "localhost";
$wgDBname = "yourDBname";
$wgDBuser = "yourDBuser";
$wgDBpassword = "yourDBpassword";

# MySQL specific settings
$wgDBprefix = "wik_";

# MySQL table options to use during installation or update
$wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=utf8";

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

## Shared memory settings
$wgMainCacheType = CACHE_ACCEL;//CACHE_MEMCACHED;
$wgMemCachedServers = array( '127.0.0.1:11211' );

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

# InstantCommons allows wiki to use images from http://commons.wikimedia.org
$wgUseInstantCommons = false;

## If you use ImageMagick (or any other shell command) on a
## Linux server, this will need to be set to the name of an
## available UTF-8 locale
$wgShellLocale = "en_US.utf8";

## 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;

## Set $wgCacheDirectory to a writable directory on the web server
## to make your wiki go slightly faster. The directory should not
## be publically accessible from the web.
#$wgCacheDirectory = "$IP/cache";

# Site language code, should be one of the list in ./languages/Names.php
$wgLanguageCode = "en";

$wgSecretKey = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";

# Site upgrade key. Must be set to a string (default provided) to turn on the
# web installer while LocalSettings.php is in place
$wgUpgradeKey = "xxxxxxxxxxxxxxxx";

## 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.
$wgRightsPage = ""; # Set to the title of a wiki page that describes your license/copyright
$wgRightsUrl = "https://creativecommons.org/publicdomain/zero/1.0/";
$wgRightsText = "Creative Commons Zero (Public Domain)";
$wgRightsIcon = "$wgResourceBasePath/resources/assets/licenses/cc-0.png";

# Path to the GNU diff3 utility. Used for conflict resolution.
$wgDiff3 = "/usr/bin/diff3";

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

# Enabled skins.
# The following skins were automatically enabled:
wfLoadSkin( 'CologneBlue' );
wfLoadSkin( 'Modern' );
wfLoadSkin( 'MonoBook' );
wfLoadSkin( 'Vector' );


# End of automatically generated settings.
# Add more configuration options below.

/**
 * Disable links to talk pages of anonymous users (IPs) in listings on special
 * pages like page history, Special:Recentchanges, etc.
 */
## $wgDisableAnonTalk = true;
$EXT = "$IP/extensions";

if (!$wgCommandLineMode) {
wfLoadExtension( 'WikiEditor' );
wfLoadExtension( 'SyntaxHighlight_GeSHi' );
$wgNamespacesWithSubpages[NS_MAIN] = true;
require_once "$EXT/Html2Wiki/Html2Wiki.php";
}
//require_once "$EXT/Multilang/Multilang.php";
//require_once "$EXT/Polyglot/Polyglot.php";
/*$wgPolyglotLanguages = array('en', 'de', 'fr');
require_once "$EXT/LanguageSelector/LanguageSelector.php";
$wgLanguageSelectorLanguages=array('en', 'de', 'fr');
$wgLanguageSelectorDetectLanguage = LANGUAGE_SELECTOR_USE_CONTENT_LANG;*/
//$wgLanguageSelectorLocation = LANGUAGE_SELECTOR_MANUAL;
//$wfPolyglotFollowRedirects = true;

$wgExtensionAssetsPath = "{$wgScriptPath}/extensions";
//require_once "$EXT/Babel/Babel.php";

require_once "$EXT/cldr/cldr.php";

/*wfLoadExtension( 'CleanChanges' );
$wgCCUserFilter = false;
$wgCCTrailerFilter = true;*/
$wgDefaultUserOptions['usenewrc'] = 1;

require_once "$EXT/LocalisationUpdate/LocalisationUpdate.php";
$wgLocalisationUpdateDirectory = "$IP/cache";

require_once "$EXT/Translate/Translate.php";
$wgGroupPermissions['user']['translate'] = true;
$wgGroupPermissions['user']['translate-messagereview'] = true;
$wgGroupPermissions['user']['translate-groupreview'] = true;
$wgGroupPermissions['user']['translate-import'] = true;
$wgGroupPermissions['sysop']['pagetranslation'] = true;
$wgGroupPermissions['sysop']['translate-manage'] = true;
$wgTranslateDocumentationLanguageCode = 'qqq';
$wgExtraLanguageNames['qqq'] = 'Message documentation'; # No linguistic content. Used for documenting messages
require_once "$EXT/UniversalLanguageSelector/UniversalLanguageSelector.php";
$wgULSGeoService = false;
//$wgShowExceptionDetails = true;  //enable for error details
//require_once "$EXT/Random/Random.php";
require_once "$EXT/RandomInclude/RandomInclude.php";
$wgRandomInclude['pattern'] = '*';    // default pattern to use as boundary between items (use '----' to get previous behaviour)
$wgRandomInclude['separator'] = '';   // default separator rendered between items
$wgRandomInclude['count'] = 1;        // default number of items
$wgRandomInclude['limit'] = 20;       // default limit on runaway loop
$wgRandomInclude['seed'] = 'none';      // default seed value
$wgRandomInclude['hash'] = 'none';      // default hash value
$wgRandomInclude['period'] = 'none';    // default period as minute, hour, day, week or seconds (integer)
$wgRandomInclude['mode'] = 'none';         // default mode is none or ordered depending on count
$wgRandomInclude['cache'] = 'disable';// default cache strategy, set to 'disable' to do no caching
$wgRandomInclude['format'] = 'none';  // default format string, set to 'none' to do no formatting of output
wfLoadExtension( 'HitCounters' );
require_once "$EXT/ConfirmEdit/ConfirmEdit.php";
wfLoadExtension( 'ConfirmEdit/FancyCaptcha' );
$wgCaptchaClass = 'FancyCaptcha';
$wgCaptchaDirectory = "/path/to/captcha";
$wgCaptchaDirectoryLevels = 0; // Set this to a value greater than zero to break the images into subdirectories
$wgCaptchaSecret = "xxxxxxxxxx"; // same value you used in --key option in captcha.py
$wgCaptchaTriggers['edit']          = true; 
$wgCaptchaTriggers['create']        = true; 
$wgCaptchaTriggers['addurl']        = true; 
$wgCaptchaTriggers['createaccount'] = true;
$wgCaptchaTriggers['badlogin']      = true;
wfLoadExtension( 'Cite' );
wfLoadExtension( 'ParserFunctions' );

Redémarrez le serveur Web

$ sudo apache2ctl restart

Et vous devriez être en mesure d'utiliser MediaWiki.

http://localhost/wiki

Après avoir terminé les réglages de base vous pouvez déplacer le fichier.

$ sudo mv /var/lib/mediawiki/config/LocalSettings.php /var/lib/mediawiki

Faire une réplique[Bearbeiten]

Nous analysons actuellement les façons de faire des répliques de lawiki sans compromettre la sécurité ou d'un serveur central, ni celle de tous les miroirs.

Nous connaissons les méthodes suivantes:

Copie manuelle[Bearbeiten]

OK, c'est un travail très lent et difficile d'avoir à ouvrir chaque élément et de les copier un par un dans le nouveau Wiki.

Special:Export[Bearbeiten]

1. Naviguez vers Special:SpecialPages

2. Ouvrez Special:Export

3. Notez le titre de chaques pages à exporter et cliquez sur le bouton exporter pour obtenir votre XML

4. maintenant, vous pouvez facilement importer le fichier XML dans votre Wiki

http://your.wiki/wiki/index.php/Special:Import

Choisissez simplement le fichier XML dans votre répertoire de téléchargement. Après quelques secondes d'importation, les pages seront affichées dans votre site

I2PWiki XML DUMP[Bearbeiten]

Page d'aide du script de dump xml:
Manual:DumpBackup.php<ref>https://www.mediawiki.org/wiki/Manual:DumpBackup.php</ref>

Sauvegarde automatique toute les 6 heures:
php /path/to/the/script/dumpBackup.php --current --include-files --uploads --output=gzip:/path/to/xml_dump/i2pwiki_current.xml.gz
php /path/to/the/script/dumpBackup.php --full --include-files --uploads --output=gzip:/path/to/xml_dump/i2pwiki_full.xml.gz

Dumps download page:
http://bf6ixuhfjftzk5hhag3etgwdchyvmwtnzp7ekx63nhfjmuuyql5a.b32.i2p/

Pour importer/restaurer dans MediaWiki:
Manual:Importing_XML_dumps<ref>https://www.mediawiki.org/wiki/Manual:Importing_XML_dumps</ref>


Tahoe-LAFS[Bearbeiten]

Tahoe (on I2P) has the advantage of being a distributed storage service universally available.

I2PWiki begins to regularly upload a XML file with all articles of the wiki, you can import as is described in the previous section.

The only condition is that you must have access to tahoe via I2P.

The recommended procedure is described here to install and use Tahoe-LAFS-I2P.

2. This way you can access

 URI:DIR2-RO:eohydthxwqknod3zbkqmilgqzm:eoe4bknkwto5bmbjgqekawfadycqo7s7smtdexv575cwcay4zamq/

3. In that directory are located the files i2p_wiki_current.xml.gz and i2pwiki_full.xml.gz and multipart zip archives

4. You can download it manually or by default, use the following command with a crontab to download

$ tahoe cp URI:DIR-RO..../i2pwiki_current.xml.gz ./



Voir Aussi[Bearbeiten]


Références[Bearbeiten]

<references />