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

提供:MoodleDocs
移動先:案内検索
55行目: 55行目:
*Use the notification link in the site administration to start the upgrade process. You will see a series of lines or screens indicating progress.   
*Use the notification link in the site administration to start the upgrade process. You will see a series of lines or screens indicating progress.   
*After a successful upgrade, turn off the maintenance mode, so your users can get into the site.
*After a successful upgrade, turn off the maintenance mode, so your users can get into the site.
=== Using a downloaded archive ===
In some installs, the site administrator may overwrite the Moodle code with a backup copy.  Or create a new clean install copy of Moodle, then restore an archive (via a compressed file or parts of a saved set of Moodle code files and folders).
*Do not overwrite an old installation unless you know what you are doing ... sometimes old files can cause problems in new or "cleaned" installations. The best way is to rename the current Moodle code directory (for example rename "moodle" to "moodleold"), then unpack the new Moodle archive into the old location (for example, a new directory called "moodle").


====Linux====
====Linux====

2013年4月26日 (金) 16:59時点における版


再作成中です - Mitsuhiro Yoshida

Before you do anything else, read Upgrading to Moodle 2.2

Moodle is designed to upgrade itself from one version to the next. The procedure is

  1. Back up everything.
  2. Replace the old version of the code with the new one.
  3. Log in to your Moodle site and go to Settings > Site administration > Notifications which will then trigger Moodle to self-update.

These steps are explained in more detail below.

Sometimes there are specific considerations when upgrading to a particular version. See the Releases page for more information on this. You also have to be more careful if you have installed additional plug-ins or customised the code.

See this tutorial if you are upgrading Moodle on cpanel. It is a bit rough around the edges and is a little dated, but you should get the idea.

There is also a separate page about upgrading Moodle if you installed it using the Ubuntu/Kubuntu/Debian package manager.

When upgrading a Moodle installation you should follow these steps:

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

You are strongly advised to make a copy of your entire Moodle site onto another computer (see Moodle migration) and run the upgrade there to verify it will work. If you decide not to do this, make sure you have good backups. If the upgrade fails you will need the backups to go back.


必要条件を確認する

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

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

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

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

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

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

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

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

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

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

Having read the cautions about backups, download a copy of the standard install package. Here is a set of simple instructions for an average site.

  • It is probably a good idea to use the Site administration block>Server>Maintenance mode to prevent user activity as the site upgrades.
  • Having moved your old Moodle software program files to another location, unzip or unpack the upgrade file so that all new the Moodle software program files are in the location the old files used to be in on the server. Moodle will adjust SQL and moodledata if it needs to in the upgrade.
  • Copy your old config.php file back to the new Moodle directory. If you've defined individual blocks for new courses you have to delete 'admin' block definition and replace by 'settings' for the new block.
  • If you had added any custom plugins or themes into your Moodle you can add them to the new code. It is important to check that you get the correct version for your new version of Moodle. You should check in the optional plugins database. Be particularly careful that you do not overwrite any code in the new version of Moodle. If you are upgrading to Moodle 2.0 or newer, note that all optional plugins and themes required a significant rewrite and some do not have 2.0 versions (yet).
  • Use the notification link in the site administration to start the upgrade process. You will see a series of lines or screens indicating progress.
  • After a successful upgrade, turn off the maintenance mode, so your users can get into the site.

Using a downloaded archive

In some installs, the site administrator may overwrite the Moodle code with a backup copy. Or create a new clean install copy of Moodle, then restore an archive (via a compressed file or parts of a saved set of Moodle code files and folders).

  • Do not overwrite an old installation unless you know what you are doing ... sometimes old files can cause problems in new or "cleaned" installations. The best way is to rename the current Moodle code directory (for example rename "moodle" to "moodleold"), then unpack the new Moodle archive into the old location (for example, a new directory called "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をご覧ください。

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

Linuxサーバにおいて、Moodle 2.4はウェブブラウザ経由のアップグレードだけではなく、コマンドラインからのアップグレードもサポートします。特定の大規模サイトでは、コマンドラインからのアップグレードの方が信頼できると考えられます。

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

最後のステップでは、Moodle内でアップグレード処理を始動させます。

この処理を実行するには、「設定 > サイト管理 > 通知」に移動してください。

Moodleは新しいバージョンを自動的に検知して、必要なすべてのSQLデータベースまたはファイルシステムアップグレードを実行します。極めて稀なケースですが、アップグレードを実行できない場合、あなたが何をすべきか伝えるメッセージが表示されます。

すべてが (エラーメッセージなしに) 正常に修了した場合、あなたの新しいバージョンのMoodleを使って、新しい機能を楽しんでください!

注意: あなたが複数サーバを動作させている場合、すべてのサーバのアップグレードを完了した後、すべてのキャッシュを手動でクリアしてください (「設定 > サイト管理 > 開発 > すべてのキャッシュを削除する」)。

アップグレードの後で

あなたの2.2または2.3インストレーションからのconfig.phpは正常に動作しますが、Moodle 2.4に同梱されているconfig-dist.phpを確認してみると、さらに異なる利用可能なオプションがあります (例 データベースドライバおよび設定)。2.4のconfig-dist.phpを基に、あなたの古いconfig.phpの設定を新しいconfig.phpに設定するのは良いアイデアです。

Upgrading more than one version

Normally you can upgrade directly from any Moodle version to any later version. So, for example you could upgrade from 2.0 to 2.1, or from 1.9 to 2.2.

However, every so often, this general rule gets broken, because supporting really large jumps (for example Moodle 1.6 to 2.2 in one step) would be impossible. Recent break points have been:

  • You must have upgraded to version 1.9.x before you can upgrade to a later 2.x version.
  • You must have upgraded to version 2.2.x before you can upgrade to 2.3 or later.

If you are upgrading from a pre-1.6 version it is recommended that you upgrade first to the latest 1.6.x, then to the latest 1.9.x and finally to the latest 2.x. See Petr's forum post Re: Continuing on Upgrade docs for further information.

関連情報