Mediawiki Update Version 1.18.1 vers 1.19.0 : Différence entre versions
m |
(Aucune différence)
|
Version actuelle en date du 2 janvier 2014 à 14:26
L'installation initiale de MediaWiki a été faite à l'aide de la commande aptitude
. Depuis la version 1.18.1, les mises à jour sont réalisées manuellement et ce principe est repris pour la version 1.19.0. L'objectif est de mettre en place un lien /var/lib/mediawiki
pointant vers la version installée. De plus, les plugins et les contenus sont déportés dans un répertoire /var/datas/mediawiki
Sommaire
Votre avis
Nobody voted on this yet
|
|
Installation nouvelle version
L'objectif de cette installation est de maîtriser tous les fichiers et de faciliter les prochaines mises à jour. Les répertoires mis en place dans cet organisation sont:
-
/var/datas/mediawiki
: Contient les extensions installées et le répertoire de téléversement. -
/usr/share/mediawiki-1.19.0
: Installation de la version. -
/var/lib/mediawiki
: Lien vers la version à prendre en compte. -
/etc/mediawiki
: Contient les configurations.
Mise en place instance
Le fichier mediawiki-1.19.0.tar.gz
est téléchargé, depuis http://www.mediawiki.org/wiki/Download et installé:
#sudo wget -P /usr/share http://dumps.wikimedia.org/mediawiki/1.19/mediawiki-1.19.0.tar.gz #sudo tar -C /usr/share -xzvf /usr/share/mediawiki-1.19.0.tar.gz #sudo rm /usr/share/mediawiki-1.19.0.tar.gz #sudo chown -R www-data:www-data /usr/share/mediawiki-1.19.0
Il référencer le fichier LocalSettings.php
depuis /etc/mediawiki
, dans la nouvelle instance.
#sudo ln -s /etc/mediawiki/LocalSettings.php /usr/share/mediawiki-1.19.0/LocalSettings.php #sudo chown -h www-data:www-data /usr/share/mediawiki-1.19.0/LocalSettings.php
La variable MW_INSTALL_PATH
avait été modifiée, lors de l'installation de 1.18.1, afin de pointer sur l'emplacement /var/lib/mediawiki
. L'utilisation du lien permet donc donc pas avoir à modifier cette variable.
Les extensions et les contenus uploadés ont été déplacés, et il est nécessaire de les référencer dans la nouvelle instance. Concernant les extensions, cela consiste en la création de lien dans le répertoire extensions
vers /var/datas/mediawiki/extensions
, l'exemple dépend des plugins installés.
#sudo ln -s /var/datas/mediawiki/extensions/MultiUpload /usr/share/mediawiki-1.19.0/extensions/MultiUpload #sudo ln -s /var/datas/mediawiki/extensions/Piwik /usr/share/mediawiki-1.19.0/extensions/Piwik #sudo ln -s /var/datas/mediawiki/extensions/PurgeCache /usr/share/mediawiki-1.19.0/extensions/PurgeCache #sudo ln -s /var/datas/mediawiki/extensions/ReplaceText /usr/share/mediawiki-1.19.0/extensions/ReplaceText #sudo ln -s /var/datas/mediawiki/extensions/skins /usr/share/mediawiki-1.19.0/extensions/skins #sudo ln -s /var/datas/mediawiki/extensions/specialdeleteoldrevisions2 /usr/share/mediawiki-1.19.0/extensions/specialdeleteoldrevisions2 #sudo ln -s /var/datas/mediawiki/extensions/SyntaxHighlight_GeSHi /usr/share/mediawiki-1.19.0/extensions/SyntaxHighlight_GeSHi #sudo ln -s /var/datas/mediawiki/extensions/TwitterFBLike /usr/share/mediawiki-1.19.0/extensions/TwitterFBLike #sudo ln -s /var/datas/mediawiki/extensions/W4G\ Rating\ Bar /usr/share/mediawiki-1.19.0/extensions/W4G\ Rating\ Bar #sudo chown -h www-data:www-data /usr/share/mediawiki-1.19.0/extensions/MultiUpload #sudo chown -h www-data:www-data /usr/share/mediawiki-1.19.0/extensions/Piwik #sudo chown -h www-data:www-data /usr/share/mediawiki-1.19.0/extensions/PurgeCache #sudo chown -h www-data:www-data /usr/share/mediawiki-1.19.0/extensions/ReplaceText #sudo chown -h www-data:www-data /usr/share/mediawiki-1.19.0/extensions/skins #sudo chown -h www-data:www-data /usr/share/mediawiki-1.19.0/extensions/specialdeleteoldrevisions2 #sudo chown -h www-data:www-data /usr/share/mediawiki-1.19.0/extensions/SyntaxHighlight_GeSHi #sudo chown -h www-data:www-data /usr/share/mediawiki-1.19.0/extensions/TwitterFBLike #sudo chown -h www-data:www-data /usr/share/mediawiki-1.19.0/extensions/W4G\ Rating\ Bar
Ce qui donne le contenu suivant dans /usr/share/mediawiki-1.19.0/extensions
drwxr-xr-x 9 www-data www-data 4096 2012-05-06 18:04 ./ drwxr-xr-x 15 www-data www-data 4096 2012-05-06 17:54 ../ drwxr-xr-x 2 www-data www-data 4096 2012-05-02 15:39 ConfirmEdit/ drwxr-xr-x 2 www-data www-data 4096 2012-05-02 15:39 Gadgets/ -rw-r--r-- 1 www-data www-data 22 2012-05-02 15:39 .gitignore lrwxrwxrwx 1 www-data www-data 43 2012-05-06 17:43 MultiUpload -> /var/datas/mediawiki/extensions/MultiUpload/ drwxr-xr-x 2 www-data www-data 4096 2012-05-02 15:39 Nuke/ drwxr-xr-x 2 www-data www-data 4096 2012-05-02 15:39 ParserFunctions/ lrwxrwxrwx 1 www-data www-data 37 2012-05-06 18:01 Piwik -> /var/datas/mediawiki/extensions/Piwik/ lrwxrwxrwx 1 www-data www-data 42 2012-05-06 18:02 PurgeCache -> /var/datas/mediawiki/extensions/PurgeCache/ -rw-r--r-- 1 www-data www-data 1053 2012-05-02 15:39 README drwxr-xr-x 2 www-data www-data 4096 2012-05-02 15:39 Renameuser/ lrwxrwxrwx 1 www-data www-data 43 2012-05-06 17:43 ReplaceText -> /var/datas/mediawiki/extensions/ReplaceText/ lrwxrwxrwx 1 www-data www-data 37 2012-05-06 17:43 skins -> /var/datas/mediawiki/extensions/skins/ lrwxrwxrwx 1 www-data www-data 58 2012-05-06 17:43 specialdeleteoldrevisions2 -> /var/datas/mediawiki/extensions/specialdeleteoldrevisions2/ lrwxrwxrwx 1 www-data www-data 53 2012-05-06 17:43 SyntaxHighlight_GeSHi -> /var/datas/mediawiki/extensions/SyntaxHighlight_GeSHi/ lrwxrwxrwx 1 www-data www-data 45 2012-05-06 18:03 TwitterFBLike -> /var/datas/mediawiki/extensions/TwitterFBLike/ drwxr-xr-x 3 www-data www-data 4096 2012-05-02 15:39 Vector/ lrwxrwxrwx 1 www-data www-data 46 2012-05-06 18:04 W4G Rating Bar -> /var/datas/mediawiki/extensions/W4G Rating Bar/ drwxr-xr-x 4 www-data www-data 4096 2012-05-02 15:39 WikiEditor/
Le dernier lien mis en place concerne le répertoire images
, l'original est supprimé car il ne sera pas utilisé.
#sudo ln -s /var/datas/mediawiki/images /usr/share/mediawiki-1.19.0/images #sudo chown -h www-data:www-data /usr/share/mediawiki-1.19.0/images
Enfin, il faut changer le lien symbolique /var/lib/mediawiki
pour activer la nouvelle version.
#sudo rm /var/lib/mediawiki #sudo ln -s /usr/share/mediawiki-1.19.0 /var/lib/mediawiki #sudo chown -h www-data:www-data /var/lib/mediawiki
Mise à jour de la base de données
Suite à la précédente mise à jour, les droits d'accès sur le compte MySql sont mis à jour pour s'éviter toutes les tentatives.
mysql> GRANT CREATE ON wikidb.* TO 'wikiuser'@'localhost';
Query OK, 0 rows affected (0.00 sec)
mysql> GRANT ALTER ON wikidb.* TO 'wikiuser'@'localhost';
Query OK, 0 rows affected (0.00 sec)
mysql> GRANT INDEX ON wikidb.* TO 'wikiuser'@'localhost';
Query OK, 0 rows affected (0.00 sec)
mysql> FLUSH PRIVILEGES;
Query OK, 0 ROWS affected (0.00 sec)
La mise à jour s'effectue par l'exécution du script update.php
, situé dans le répertoire maintenance
de l'installation:
#cd /var/lib/mediawiki/maintenance #sudo php update.php MediaWiki 1.19.0 Updater Going to run database updates for wikidb-ejnwiki_ Depending on the size of your database this may take a while! Abort with control-c in the next five seconds (skip this countdown with --quick) ... 0 ...have ipb_id field in ipblocks table. ...have ipb_expiry field in ipblocks table. ...already have interwiki table ...indexes seem up to 20031107 standards. ...hitcounter table already exists. ...have rc_type field in recentchanges table. ...have user_real_name field in user table. ...querycache table already exists. ...objectcache table already exists. ...categorylinks table already exists. ...have pagelinks; skipping old links table updates ...il_from OK ...have rc_ip field in recentchanges table. ...index PRIMARY already set on image table. ...have rc_id field in recentchanges table. ...have rc_patrolled field in recentchanges table. ...logging table already exists. ...have user_token field in user table. ...have wl_notificationtimestamp field in watchlist table. ...watchlist talk page rows already present. ...user table does not contain user_emailauthenticationtimestamp field. ...page table already exists. ...have log_params field in logging table. ...logging table has correct log_title encoding. ...have ar_rev_id field in archive table. ...have page_len field in page table. ...revision table does not contain inverse_timestamp field. ...have rev_text_id field in revision table. ...have rev_deleted field in revision table. ...have img_width field in image table. ...have img_metadata field in image table. ...have user_email_token field in user table. ...have ar_text_id field in archive table. ...page_namespace is already a full int (int(11)). ...ar_namespace is already a full int (int(11)). ...rc_namespace is already a full int (int(11)). ...wl_namespace is already a full int (int(11)). ...qc_namespace is already a full int (int(11)). ...log_namespace is already a full int (int(11)). ...have img_media_type field in image table. ...already have pagelinks table. ...image table does not contain img_type field. ...already have unique user_name index. ...user_groups table exists and is in current format. ...have ss_total_pages field in site_stats table. ...user_newtalk table already exists. ...transcache table already exists. ...have iw_trans field in interwiki table. ...wl_notificationtimestamp is already nullable. ...index times already set on logging table. ...have ipb_range_start field in ipblocks table. ...no page_random rows needed to be set ...have user_registration field in user table. ...templatelinks table already exists ...externallinks table already exists. ...job table already exists. ...have ss_images field in site_stats table. ...langlinks table already exists. ...querycache_info table already exists. ...filearchive table already exists. ...have ipb_anon_only field in ipblocks table. ...index rc_ns_usertext already set on recentchanges table. ...index rc_user_text already set on recentchanges table. ...have user_newpass_time field in user table. ...redirect table already exists. ...querycachetwo table already exists. ...have ipb_enable_autoblock field in ipblocks table. ...index pl_namespace on table pagelinks includes field pl_from. ...index tl_namespace on table templatelinks includes field tl_from. ...index il_to on table imagelinks includes field il_from. ...have rc_old_len field in recentchanges table. ...have user_editcount field in user table. ...page_restrictions table already exists. ...have log_id field in logging table. ...have rev_parent_id field in revision table. ...have pr_id field in page_restrictions table. ...have rev_len field in revision table. ...have rc_deleted field in recentchanges table. ...have log_deleted field in logging table. ...have ar_deleted field in archive table. ...have ipb_deleted field in ipblocks table. ...have fa_deleted field in filearchive table. ...have ar_len field in archive table. ...have ipb_block_email field in ipblocks table. ...index cl_sortkey on table categorylinks includes field cl_from. ...have oi_metadata field in oldimage table. ...index usertext_timestamp already set on archive table. ...index img_usertext_timestamp already set on image table. ...index oi_usertext_timestamp already set on oldimage table. ...have ar_page_id field in archive table. ...have img_sha1 field in image table. ...protected_titles table already exists. ...have ipb_by_text field in ipblocks table. ...page_props table already exists. ...updatelog table already exists. ...category table already exists. ...category table already populated. ...have ar_parent_id field in archive table. ...have user_last_timestamp field in user_newtalk table. ...protected_titles table has correct pt_title encoding. ...have ss_active_users field in site_stats table. ...ss_active_users user count set... ...have ipb_allow_usertalk field in ipblocks table. ...pl_namespace, tl_namespace, il_to indices are already UNIQUE. ...change_tag table already exists. ...tag_summary table already exists. ...valid_tag table already exists. ...user_properties table already exists. ...log_search table already exists. ...have log_user_text field in logging table. ...l10n_cache table already exists. ...external_user table already exists. ...index ls_field_val already set on log_search table. ...index change_tag_rc_tag already set on change_tag table. ...have rd_interwiki field in redirect table. ...transcache tc_time already converted. ...eu_wiki_id already renamed to eu_local_id. ...*_mime_minor fields are already long enough. ...iwlinks table already exists. ...index iwl_prefix_title_from already set on iwlinks table. ...have ul_value field in updatelog table. ...have iw_api field in interwiki table. ...iwl_prefix key doesn't exist. ...iwl_prefix_from_title key doesn't exist. ...have cl_collation field in categorylinks table. ...categorylinks up-to-date. ...collations up-to-date. ...msg_resource table already exists. ...module_deps table already exists. ...ar_page_revid key doesn't exist. ...index ar_revid already set on archive table. ...ll_lang is up-to-date. ...user_last_timestamp is already nullable. ...index user_email already set on user table. ...up_property in table user_properties already modified by patch patch-up_property.sql. ...uploadstash table already exists. ...user_former_groups table already exists. Adding index type_action to table logging... done. ...batch conversion of user_options: --Converted to ID 1 done. Converted 1 user records. done. Table user contains user_options field. Dropping... done. Adding rev_sha1 field to table revision...done. Adding ar_sha1 field to table archive...done. Adding index page_redirect_namespace_len to table page... done. Modifying ug_group field of table user_groups...done. Adding us_chunk_inx field to table uploadstash...done. Adding job_timestamp field to table job...done. Modifying ufg_group field of table user_former_groups...done. ...site_stats is populated...done. Purging caches...done. Checking existence of old default messages...done. ...rev_len column of revision table already populated. Populating rev_sha1 column ...doing rev_id from 137 to 336 ...doing rev_id from 337 to 536 ...doing rev_id from 537 to 736 ...doing rev_id from 737 to 936 ...doing rev_id from 937 to 1136 ...doing rev_id from 1137 to 1336 ...doing rev_id from 1337 to 1536 ...doing rev_id from 1537 to 1736 ...doing rev_id from 1737 to 1936 ...doing rev_id from 1937 to 2136 ...doing rev_id from 2137 to 2336 ...doing rev_id from 2337 to 2536 ...doing rev_id from 2537 to 2736 ...doing rev_id from 2737 to 2936 ...doing rev_id from 2937 to 3136 ...doing rev_id from 3137 to 3336 ...doing rev_id from 3337 to 3536 ...doing rev_id from 3537 to 3736 ...doing rev_id from 3737 to 3936 ...doing rev_id from 3937 to 4136 ...doing rev_id from 4137 to 4336 ...doing rev_id from 4337 to 4536 Populating ar_sha1 column ...doing ar_rev_id from 811 to 1010 ...doing ar_rev_id from 1011 to 1210 ...doing ar_rev_id from 1211 to 1410 ...doing ar_rev_id from 1411 to 1610 ...doing ar_rev_id from 1611 to 1810 ...doing ar_rev_id from 1811 to 2010 ...doing ar_rev_id from 2011 to 2210 ...doing ar_rev_id from 2211 to 2410 ...doing ar_rev_id from 2411 to 2610 ...doing ar_rev_id from 2611 to 2810 ...doing ar_rev_id from 2811 to 3010 ...doing ar_rev_id from 3011 to 3210 ...doing ar_rev_id from 3211 to 3410 ...doing ar_rev_id from 3411 to 3610 ...doing ar_rev_id from 3611 to 3810 ...doing ar_rev_id from 3811 to 4010 ...doing ar_rev_id from 4011 to 4210 ...doing ar_rev_id from 4211 to 4410 ...doing ar_rev_id from 4411 to 4610 Populating ar_sha1 column legacy rows rev_sha1 and ar_sha1 population complete [997 revision rows, 25 archive rows]. Populating img_sha1 field Done 0 files in 0.0 seconds ...protocol-relative URLs in externallinks table already fixed. Done.
L'exécution a été réalisée à partir du lien /var/lib/mediawiki
, et non pas directement dans la version installée, validant ainsi la répartition des fichiers.
Les droits accordés, sur le compte d'accès à la base de données, ne sont pas nécessaires pour le bon fonctionnement du Wiki. Ils sont donc supprimés:
mysql> REVOKE CREATE ON wikidb.* FROM 'wikiuser'@'localhost';
Query OK, 0 rows affected (0.00 sec)
mysql> REVOKE ALTER ON wikidb.* FROM 'wikiuser'@'localhost';
Query OK, 0 rows affected (0.00 sec)
mysql> REVOKE INDEX ON wikidb.* FROM 'wikiuser'@'localhost';
Query OK, 0 rows affected (0.00 sec)
mysql> FLUSH PRIVILEGES;
Query OK, 0 ROWS affected (0.00 sec)
Mise à jour configuration Apache
Aucune mise à jour de Apache n'est nécessaire, puisque la configuration mise en place pointe à présent sur le lien /var/lib/mediawiki