メインページ

提供: N2アーカイブ
ナビゲーションに移動 検索に移動

N2アーカイブの目的について

このサイトは「さくらインターネット」で、MediaWikiのバージョンアップができるかどうかを確認するためのものです。


バージョンアップ時、以下の項目が正しく移行できているかについて確認します。
1. 登録されたアカウントが生きているか、PWは保存されているか、各種権限は保存されているか
2. アップロードした画像ファイルが正しく表示されるか
3. ページ間や他のサイトへのリンクが変化していないか
4. CSSやサイドメニュー表示は正常に作動しているか


「バージョンアップ」後、上記項目がすべて正常に作動していれば、「八中・小山台デジタルアーカイブ」でのバージョンアップ作業を実施します。
関係各位のご協力をよろしくお願いいたします。









こちらには、いろいろな「覚え」を記載しておくつもりです。
年のせいか、何でもすぐに忘れてしまうので「備忘録」として活用したい。




各種ページへのリンク

カテゴリ

カテゴリ表示/非表示
1. ○○○○○     6. ○○○○○ 11. ○○○○○
2. レンタルサーバーへのMediaWikiインストール    7. ○○○○○ 12. ○○○○○   
3. MediaWikiの各種設定について 8. ○○○○○ 13. ○○○○○
4. MediaWikiヘルプ     9. 雑多な情報 14. ○○○○○
5. ○○○○○     10. ○○○○○ 15. ○○○○○
 





MediaWikiインストール

「MediaWiki」は「Wikipedia」と同じ枠組みを簡単に作れるすばらしいソフトです。
「よーしオイラも自前のWikipediaを構築してみよう!」と思い立って始めたのは良かったのですが、
Web上の情報が少ないのと、たまにあっても「古~い」情報だったり、「Linuxコマンド堪能なお方」による、難解なコマンド羅列のご説明だったりして困りました。
さらに、本家本元の「MediaWiki」サイトのヘルプが、これまた日本語とは思えない「超難解!」。 Linuxコマンド以上の難易度であります。orz
そこで「まずはやってみよう」と始めて、さまざまな「試行錯誤」を繰り返し、なんとかできるようになりました(Google様と、行き詰まったときに気晴らしに読んだ小説・マンガのおかげです)。


以下のリンクは「試行錯誤」の結果です。まだ、良く分かっていないところもありますが、同じような境遇の方のお役に立てれば幸いです。
1. さくらのレンタルサーバー
2. XServer (このサイトを置いているレンタルサーバーです)
3. StarFreeサーバー
4. XREAサーバー
5. XFreeサーバーについて(未インストール)



MediaWikiの各種設定

インストールが終わったら、初期設定やその他の設定をすると快適に使えるようになります。
主な設定項目は以下のとおりです。
1. 「メインページ」以外を非公開にする
2. 「アカウントの登録」と「権限設定」
3. 「メインページ」のカスタマイズ
4. 「サイドバー(左のメニュー)」のカスタマイズ




MediaWikiのバージョンアップ

MediaWiki の新バージョンが出ています。Ver-1.35から「Visual Editor」が使えるようになったとのことです。
現時点(2021/12/17)での最新はVer-1.37です。


以下にバージョンアップ手順を記録します(ちゃんとVerUpできるか不明ですが...)


1. ファイル転送
MediaWikiのヘルプを見ると、まず「ファイル転送しろ」となっています。
「WinSCP」でFTP転送できるので、これでファイル転送する。
2. 準備
上記ヘルプには次に「準備」の項目があり、そこには以下の記述がある。
MediaWikiに含まれるUPGRADE テキストファイルを読みましょう。


This file provides an overview of the MediaWiki upgrade process.
このファイルは、MediaWikiのアップグレードプロセスの概要を提供します。
For help with specific problems, you should check:
特定の問題のヘルプについては、以下を確認する必要があります。


the docs at https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents
https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents のドキュメント
the mediawiki-l mailing list archive at https://lists.wikimedia.org/pipermail/mediawiki-l/
mediawiki-lメーリングリストアーカイブ https://lists.wikimedia.org/pipermail/mediawiki-l/
and the bug tracker at https://phabricator.wikimedia.org/ … for information and workarounds to common issues.
およびhttps://phabricator.wikimedia.org/のバグトラッカー …一般的な問題の情報と回避策について。


この上に書かれている、3個のURLだが、英語堪能な方以外は無視して良いだろう。というか読めないんだからどーしようもない。
運良く、自分のトラブルに該当するものを見つけられて、何とか意味が分かれば「それは祝着でしたな!」となる。


概要

We provide comprehensive documentation on upgrading to the latest version of the software at https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Upgrading.
ソフトウェアの最新バージョンへのアップグレードに関する包括的なドキュメントは、https://www.mediawiki.org/wiki/Special:MyLanguage / Manual:Upgradingで提供されています。


Important: Upgrading from releases older than two LTS release is not supported anymore.
重要:2つのLTS[1]版より古いVersionからのアップグレードは不可能となりました。
If you want to upgrade from an old version, please upgrade to a more recent LTS version first, then to this version.
古いバージョンからアップグレードする場合は、最初に新しいLTS Versionにアップグレードした後に、このバージョン(1.37)にアップグレードしてください。
Currently any upgrade from any version older than 1.27 will fail.
現在、Version-1.27より古いバージョンからのアップグレードは失敗します。
と言っているが、今回は旧バージョンが「1.34.2」なので問題ないと思われる。


1. 要件を確認する(右の「展開する」クリックで詳細表示)
MediaWiki 1.37 の要件は以下の通りです:
PHP 7.3.19/7.4.3+
MySQL 5.5.8+ (または同等の MariaDB)
これは、5.7だからOK。


2. RELEASE-NOTES ファイルを読む
Before doing anything, stop and consult the release notes supplied with the new version of the software.
何かをする前に、一度止まって、ソフトウェアの新しいバージョンに付属しているリリースノートを参照してください。
These detail bug fixes, new features and functionality, and any particular points that may need to be noted during the upgrade process.
これらの詳細なバグ修正、新しい特長と新機能、そして特定のポイントなどは、アップグレードプロセス中に注意する必要があります。


3. UPGRADE ファイルを読む → これって「最新Verのファイル解凍して、新たなフォルダーを作成しそのフォルダーにコピーする」という意味だろうか?→いや違う。

Download the files for the new version of the software. These are available as a compressed "tar" archive from the Wikimedia Download Service (https://releases.wikimedia.org/mediawiki/).

ソフトウェアの新しいバージョンのファイルをダウンロードします。 これらは、ウィキメディアダウンロードサービスから圧縮された「tar」アーカイブとして入手できます。 (https://releases.wikimedia.org/mediawiki/)。

You can also obtain the new files directly from our Git source code repository. 新しいファイルは、Gitソースコードリポジトリから直接入手することもできます。 Replace the existing MediaWiki files with the new. You should preserve the LocalSettings.php file and the "extensions" and "images" directories. 既存のMediaWikiファイルを新しいものに置き換えます。 LocalSettings.phpファイルと「extensions」および「images」ディレクトリを保持する必要があります。 Depending upon your configuration, you may also need to preserve additional directories, including a custom upload directory ($wgUploadDirectory), deleted file archives, and any custom skins. 構成によっては、カスタムアップロードディレクトリ($ wgUploadDirectory)、削除されたファイルアーカイブ、カスタムスキンなどの追加のディレクトリを保持する必要がある場合もあります。


4. 既存のファイルとデータベースをバックアップする
It is imperative that, prior to attempting an upgrade of the database schema, you take a complete backup of your wiki database and files and verify it.
データベーススキーマのアップグレードを試みる前に、wikiデータベースとファイルの完全なバックアップを取り、それを検証することが不可欠です。
While the upgrade scripts are somewhat robust, there is no guarantee that things will not fail, leaving the database in an inconsistent state.
アップグレードスクリプトはある程度堅牢ですが、失敗しないという保証はありませんし、データベースが一貫性のない状態になってしまうこともあります。


https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Backing_up_a_wiki is an overview of the backup process.
上記URL」には、バックアッププロセスの概要が記載されています。
You should also refer to the documentation for your database management system for information on backing up a database,
データベースのバックアップに関する情報は、データベース管理システムのドキュメントを参照ください。
and to your operating system documentation for information on making copies of files.
そして、ファイルのコピーについては、使用しているOSのドキュメントを参照してください。


5. 新しいファイルを展開する

Download the files for the new version of the software. These are available as a compressed "tar" archive from the Wikimedia Download Service (https://releases.wikimedia.org/mediawiki/). ソフトウェアの新しいバージョンのファイルをダウンロードします。 これらは、ウィキメディアダウンロードサービスから圧縮された「tar」アーカイブとして入手できます。 (https://releases.wikimedia.org/mediawiki/)。

You can also obtain the new files directly from our Git source code repository. 新しいファイルは、Gitソースコードリポジトリから直接入手することもできます。 Replace the existing MediaWiki files with the new. You should preserve the LocalSettings.php file and the "extensions" and "images" directories. 既存のMediaWikiファイルを新しいものに置き換えます。 LocalSettings.phpファイルと「extensions」および「images」ディレクトリを保持する必要があります。 Depending upon your configuration, you may also need to preserve additional directories, including a custom upload directory ($wgUploadDirectory), deleted file archives, and any custom skins. 構成によっては、カスタムアップロードディレクトリ($ wgUploadDirectory)、削除されたファイルアーカイブ、カスタムスキンなどの追加のディレクトリを保持する必要がある場合もあります。


6. 拡張機能をアップグレードする
Extensions usually need to be upgraded at the same time as the MediaWiki core.
拡張機能は通常、MediaWikiコアと同時にアップグレードする必要があります。
In MediaWiki 1.14 some extensions were migrated into the core.
MediaWiki 1.14では、いくつかの拡張機能がコアに移行されました。
Please see the HISTORY section "Migrated extensions" and disable these extensions in your LocalSettings.php
HISTORYセクションの「移行された拡張機能」を参照し、LocalSettings.phpでこれらの拡張機能を無効にしてください


7. 更新スクリプトを実行してデータベースをチェックする
コマンドラインからデータベースのアップグレードを実行する、ということですかね。
From the command line, browse to the "maintenance" directory and run the
update.php script to check and update the schema.
コマンドラインから「maintenance」ディレクトリに移動して、「update.php」を実行することでアップデートできるようだ。
This will insert missing tables, update existing tables, and move data around as needed.
In most cases, this is successful and nothing further needs to be done.
この「update.php」スクリプトの実行で、テーブル、既存のテーブルを更新し、必要に応じてデータを移動します。
ほとんどの場合、これは成功するので、これ以上何もする必要はありません。
If you need to separate out the schema changes so they can be run by someone with more privileges,
then you can use the --schema option to produce a text file with the necessary commands.
You can use --schema, --noschema, $wgAllowSchemaUpdates as well as proper database permissions to enforce this separation.
より多くの特権を持つ誰かが実行できるようにスキーマの変更を分離する必要がある場合は、次に、-schemaオプションを使用して、必要なコマンドを含むテキストファイルを作成できます。
--schema、-noschema、$ wgAllowSchemaUpdates、および適切なデータベース権限を使用して、この分離を強制できます。


8. アップグレードをテストする
It makes sense to test your wiki immediately following any kind of maintenance procedure,
あらゆる種類のメンテナンス手順の直後にウィキをテストすることは理にかなっています。
and especially after upgrading; check that page views and edits work normally, that special pages continue to function, etc.,
特にアップグレード後。 ページの表示と編集が正常に機能すること、特別なページが引き続き機能することなどを確認します。
and correct any errors and quirks which reveal themselves.
そして、自分自身を明らかにするエラーや癖を修正します。
You should also test any extensions, and upgrade these if necessary.
また、拡張機能をテストし、必要に応じてアップグレードする必要があります。


9. Remove leftovers from old installations (古いインストールから残り物を削除します)
となっている。

Configuration settings(構成設定)を確認してください

The names of configuration variables, and their default values and purposes, can change between release branches,
構成変数の名前、およびそれらのデフォルト値と目的は、リリースブランチ間で変更できます。
e.g. $wgDisableUploads in 1.4 is replaced with $wgEnableUploads in later versions.
例えば 1.4の$ wgDisableUploadsは、それ以降のバージョンでは$ wgEnableUploadsに置き換えられています。
When upgrading, consult the release notes to check for configuration changes which would alter the expected behavior of MediaWiki.
アップグレードするときは、リリースノートを参照して、MediaWikiの予想される動作を変更する構成の変更を確認してください。





バックアップしろ
その概要はManual:ウィキのバックアップに記載してある。



こちら↓の説明が分かりやすい。
MediaWikiバックアップ/リストアを分かりやすく説明














脚注:

  1. LTS:Long Term Support 詳細説明はこちら参照