「Moodleをアップグレードする」の版間の差分

提供:MoodleDocs
移動先:案内検索
65行目: 65行目:
=== Gitを使用する===
=== Gitを使用する===


You can use Git for updating or upgrading your Moodle. See [[Git for Administrators]] for details.
あなたのMoodleの更新またはアップグレードのためにGitを使用することができます。詳細は[[管理者用Git]]をご覧ください。


===コマンドラインアップグレード===
===コマンドラインアップグレード===

2013年4月3日 (水) 15:06時点における版


再作成中です - Mitsuhiro Yoshida

このページでは、Moodleのアップグレード方法を詳細に説明します。処理の概要に関して、アップグレード概要をご覧ください。

必要条件を確認する

あなたのサーバが2.4の必要条件すべてに合致するかどうか、「設定 > サイト管理> サーバ > 動作環境」にて確認してください。

注意: あなたはMoodle 2.2またはそれ以降のバージョンからのみ、Moodle 2.4にアップグレードすることができます。古いバージョンからアップグレードする場合、あなたは最初の段階で2.2にアップグレードする必要があります。

プラグインの更新を確認する

あなたのサイトにインストールしている貢献/カスタムプラグイン (テーマを含む) の2.4バージョンがあるかどうか、Moodleプラグインディレクトリにて確認してください。2.4バージョンが存在している場合、プラグインコードをダウンロードして、あなたのMoodleコード内の適切な場所にコピーしてください (詳細はプラグインのインストールをご覧ください)。

プラグインのアップグレードはMoodleアップグレード処理の一部として実施されます。

古いプラグインによりアップグレードが失敗する場合、通常あなたはアンインストールするより、関連データを削除しないよう、そのプラグインをMoodle内から削除することができます。

注意: あなたが非標準ブロックをインストールしている場合、未定義のブロックケイパビリティに関して、下記をご覧ください。

あなたのサイトを実際にアップグレードする前に

予想どおりに動作するかどうか確認するため、最初にあなたの実運用サイトのコピーを使ったアップグレードのテストをお勧めします。

重要なデータをバックアップする

アップグレード前にバックアップすべきエリアが3つあります:

  1. Moodleソフトウェア (例: サーバ/htdocs/moodle内のすべて)
  2. Moodleにアップロードされたファイル (例: サーバ/moodledata)
  3. Moodleデータベース (例: MySQLまたはPostgresデータベース)

詳細はサイトバックアップをご覧ください。

あなたのサイトをメンテナンスモードにする

あなたのサイトをアップグレードする前に、非管理者ユーザのログインを止めるため、メンテナンスモードに切り替えてください。

新しいMoodleソフトウェアをインストールする

標準インストールパッケージ

  1. あなたの古いMoodleプログラムファイルを別の場所に移動してください。古いファイルの上に新しいファイルをコピーしないでください。
  2. サーバ内の古いファイルが配置されていた場所に新しいMoodleソフトウェアプログラムのファイルを配置するため、アップグレードファイルを解凍してください。アップグレードに必要であれば、MoodleはSQLおよびmoodledataを調整します。
  3. あなたの古いconfig.phpファイルを新しいMoodleディレクトリにコピーしてください。
  4. 上記で言及したとおり、あなたのサイトにカスタムプラグインをインストールしている場合、それらを新しいコードに追加してください。あなたが最新バージョンのMoodleを取得していることを確認することは大切なことです。特に新しいバージョンのコードに上書きしないよう、十分に注意してください。

Linux

mv moodle moodle.backup
tar xvzf moodle-2.4.tgz

次に、あなたのconfig.php、すべての独自プラグイン、そして作成している場合は .htaccessファイルをコピーしてください (最初にカスタムプラグインがあなたの新しいMoodleに合致した新しいバージョンであることをチェックしてください):

cp moodle.backup/config.php moodle
cp -pr moodle.backup/theme/mytheme moodle/theme/mytheme
cp -pr moodle.backup/mod/mymod moodle/mod/mymod

忘れずに、あなたのサーバから moodle/config.php (および他のソースコード) を読めるようにしてください。理想的には、あなたのサーバからファイルに書き込みできないようにすべきです。

あなたがcronを使用している場合、cron.phpに実行権が与えられていること、それから正しいphpコマンドを使用していることに注意してください:

chmod 740 admin/cli/cron.php (some configurations need chmod 750 or chmod 755)

必要であれば、cron.phpの最初の行をコピーしてください (最初の行が '#!/usr/local/bin/php' または '#!/usr/local/bin/php5.3' のようでしたら、'<?php' をコピーする必要はありません)。

Gitを使用する

あなたのMoodleの更新またはアップグレードのためにGitを使用することができます。詳細は管理者用Gitをご覧ください。

コマンドラインアップグレード

On Linux servers, Moodle 2.4 supports running the upgrade from the command line, rather than through a web browser. This is likely to be more reliable, particularly for large sites.

アップグレードを終了する

The last step is to trigger the upgrade processes within Moodle.

To do this just go to Settings > Site administration > Notifications.

Moodle will automatically detect the new version and perform all the SQL database or file system upgrades that are necessary. If there is anything it can't do itself (very rare) then you will see messages telling you what you need to do.

Assuming all goes well (no error messages) then you can start using your new version of Moodle and enjoy the new features!

Note: If you are running multiple servers then you should purge all caches manually (via Settings > Site administration > Development > Purge all caches) after completing the upgrade on all servers.

アップグレードの後で

The config.php file from your 2.2 or 2.3 installation should work fine but if you take a look at config-dist.php that came with Moodle 2.4 there are more/different options available (e.g. database drivers and settings). It's a good idea to map your old config.php settings to a new one based on the 2.4 config-dist.php.

Moodle 2.4において、あなたに影響する可能性のある問題

ブロックケイパビリティ未定義

If you have any contributed/custom blocks installed, after upgrading you may get a debugging message warning you that a block capability has not been defined. For example

The block <blockname> does not define the standard capability block/<blockname>:myaddinstance

In Moodle 2.4, addinstance and myaddinstance capabilities were added for controlling the use of blocks. See the section 'Ready, Set, Go!' in the Blocks dev docs for information on defining these capabilities for any contributed blocks.

Moodle 2.3での改善点

If you are upgrading to Moodle 2.4 from 2.2, please see the section 'Possible issues that may affect you in Moodle 2.3' in the Upgrading to Moodle 2.3 documentation.

関連情報