メインページ
ナビゲーションに移動
検索に移動
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 の新バージョンが出ています。今回の1.35では「Visual Editor」が使えるようになったとのことです。
- これは何とかバージョンアップしないといけません。
- 以下にバージョンアップ手順を記録しておきましょう(ちゃんとできるか不明ですが...)
- 1. ファイル転送
- MediaWikiのヘルプを見ると、まず「ファイル転送しろ」となっています。
- 「WinSCP」でFTP転送でOKのようなのでこれで行くことにする。
- MediaWikiのヘルプを見ると、まず「ファイル転送しろ」となっています。
- 2. 準備
- 上記ヘルプには次に「準備」の項目がある。
- そこには以下の記述がある。
- MediaWikiに含まれるUPGRADE テキストファイルを読みましょう。
- 1. 要件を確認する
- 2. RELEASE-NOTES ファイルを読む
- 3. UPGRADE ファイルを読む
- 4. 既存のファイルとデータベースをバックアップする
- 5. 新しいファイルを展開する
- 6. 拡張機能をアップグレードする
- 7. 更新スクリプトを実行してデータベースをチェックする
- 8. アップグレードをテストする
- 9. Remove leftovers from old installations (古いインストールから残り物を削除します)
- となっているが、準備じゃ無いよね。これで完了だ。
一つずつ見ていく。 まずは、これ↓
- MediaWikiに含まれるUPGRADE テキストファイルを読みましょう。
- 以下はテキストファイル(英文)のGoogle翻訳(日本語)です。長いので折り畳んでいます。右の「展開する」をクリックして読んでください。
- 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]より古いリリースからのアップグレードはサポートされなくなりました。
- If you want to upgrade from an old version, please upgrade to a more recent LTS version first, then to this version.
- 古いバージョンからアップグレードする場合は、最初に新しいLTSバージョンにアップグレードしてから、このバージョンにアップグレードしてください。
- Currently any upgrade from any version older than 1.27 will fail.
- 現在、1.27より古いバージョンからのアップグレードは失敗します。
- と言っているが、今回は1.34.2なので問題ないと思われる。
リリースノートを参照してください
- 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.
- これらの詳細なバグ修正、新機能と機能、およびアップグレードプロセス中に注意する必要がある特定のポイント。
最初にバックアップ
- 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.
- 「https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Backing_up_a_wiki」は、バックアッププロセスの概要です。
- 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.
- そして、ファイルのコピーの作成については、オペレーティングシステムのドキュメントを参照してください。
ファイルのアップグレードを実行します
- 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)、削除されたファイルアーカイブ、カスタムスキンなどの追加のディレクトリを保持する必要がある場合もあります。
データベースのアップグレードを実行します
- As of 1.21, it is possible to separate schema changes (i.e. adding, dropping,
- 1.21以降、スキーマの変更を分離することができます(つまり、追加、削除、
- or changing tables, fields, or indices) from all other database changes (e.g. populating fields).
- または、他のすべてのデータベースの変更(フィールドへの入力など)からテーブル、フィールド、またはインデックスを変更します。
- If you need this capability, see "From the command line" below.
- この機能が必要な場合は、以下の「コマンドラインから」を参照してください。
Webから
- If you browse to the Web-based installation script (usually at
./mw-config/index.php) from your wiki installation you can follow the script and upgrade your database in place.
- Webベースのインストールスクリプトを参照する場合(通常は ./mw-config/index.php)wikiのインストールから、スクリプトに従ってデータベースを適切にアップグレードできます。
コマンドラインから
- 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、および適切なデータベース権限を使用して、この分離を強制できます。
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の予想される動作を変更する構成の変更を確認してください。
インストールされている拡張機能を確認してください
- 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でこれらの拡張機能を無効にしてください
テスト
- 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.
- また、拡張機能をテストし、必要に応じてアップグレードする必要があります。
- 1. 要件の確認
- MediaWiki 1.37 の要件は以下の通りです:
- PHP 7.3.19/7.4.3+
- MySQL 5.5.8+ (または同等の MariaDB)
- これは、5.7だからOK。
- バックアップしろ
- その概要はManual:ウィキのバックアップに記載してある。
- こちら↓の説明が分かりやすい。
- MediaWikiバックアップ/リストアを分かりやすく説明
脚注: