Manual:Streamlined Windows Install Guide/ja

From MediaWiki.org
Jump to: navigation, search
インストールガイド
on FreeBSD
on GNU/Linux
- ALT Linux
- Arch Linux
- Damnsmalllinux(英)
- Debian
- Fedora
- Gentoo(英)
- Mandriva(英)
- Red Hat Enterprise Linux(英)
- Slackware(英)
- Ubuntu
on Mac OS X
on NetWare(英)
on Solaris(英)
- on Solaris 11 / opensolaris
- on Solaris 10(英)
on Windows
- Windows Server 2008(英)
- Windows Server 2003
- Streamlined Guide
- Simple Windows/Apache Guide
- on a stick
- on MoWeS Portable(英)
- on Uniform Server
- on XAMPP
- on Sourceforge.net(英)

This guide provides both a relatively easy way to install MediaWiki on a Windows PC using the XAMPP stack, and step-by-step instructions for installing each of the separate programs first. Both methods have been tested on Windows XP SP 2, but only the XAMPP method has been tested on Windows Vista.

Contents

簡単でシンプルなセットアップ (XAMPP を使用)[edit]

MediaWiki は XAMPP 1.7.3 では動作しないことにご注意ください。XAMPP 1.7.3 が使用している PHP 5.3.1 にはバグがあり、このバグにより MediaWiki との互換性が損なわれるからです。XAMPP 1.7.4 以降を使用してください。

(This method has been verified to work on Windows Vista, using xampp-win32-1.6.6a-installer and MediaWiki 1.11.2, and on Windows 7 x64, using xampp-win32-1.7.7-VC9-installer and MediaWiki 1.18.1.)

  1. XAMPP includes Apache, MySQL, and PHP all in one integrated package. Just download and run the XAMPP installer and the database and server should be installed and running.
    • XAMPP requires port 80 and 443 to be free. Even if you have no special server software running, Skype may be using these ports. Before installing XAMPP, quit Skype for the time of installation. Once Apache is running, Skype can be used without problems again.
    • XAMPP provides instructions how to secure the installation. It is a good idea to secure it now, especially with a root password for mysql, since this password will be used in the MediaWiki setup. Point your browser to http://localhost, click on Security, and follow instructions.
  2. MediaWikiをダウンロードして展開します。
  3. Find the web root folder e.g. C:\xampp\htdocs, and add the extracted MediaWiki folder to it. You might want to rename the directory from "mediawiki-n.n.n" to "mywiki" or something else easy to type. Then open a browser to http://localhost/mywiki and run the web-based installation script.
    • You do not have to create a MySQL database or MediaWiki DB user manually, the MediaWiki installation script will do everything for you.
    • See the Manual:Installation guide and Manual:MySQL/ja for more information on setting up the database during the installation.
    • Note that if the install doesn't accept the password for "root" and shows DB error message, it's possible to leave the field empty for the first time, but be sure to create the password later on. Blank password compromises the wiki.
  4. Once the configuration is completed, follow the instructions on the page to move LocalSettings.php to the wiki directory, e.g. C:\xampp\htdocs\mywiki.

注 : If you want to have short/pretty URL like Wikipedia see Short URL for details.

Note that the following is already done in the latest version of XAMPP and needs not be done. Also, xampp\apache\bin\php.ini needs to be modified for this to work. Comment out the line "extension=php_domxml.dll" by prefixing it with a ';'. The line should look like ";extension=php_domxml.dll". Stop the Apache service and then restart it.

関連項目 Manual:Installing MediaWiki on XAMPP

外部リンク[edit]

段階を追ったセットアップ[edit]

要件[edit]

  • Apache Version 2.2.16
  • MySQL Community Edition Version 5.1.49
  • PHP Version 5.3.3
  • MediaWiki Version 1.16.0 以降

必須ではありませんが、wikiを管理するためにPHPmyAdminがとても便利です。

Apache[edit]

ここではあなた自身でソースをコンパイルしたくないことを前提とします。Apacheのダウンロードミラーに移動して(例えばここ)、適切なプラットフォームと欲しいファイルを選択します(バージョン番号などをご覧下さい)。ここではSSL無しのバージョン2.2.2が利用されています。サイズは4.2MBです。

  1. ファイルをダウンロードして実行します。インストレーションウィザードで次の設定を利用します:
    • サービスとしてインストールします,
    • domainフィールドに何らかのドメイン、servernameにサーバ名、そしてemailフィールドに適切な電子メールアドレスを入力して下さい。
    • サービスとしてすべてのユーザーのために"typical installation"を選択して下さい、
    • 例えば、C:\Program Files\apache\apache2.2\にインストールします(ここでは、このフォルダを<apache-folder>と表記します)。
    • 注 : ユーザーの中にはスペースを含むファイルパスに関するインストレーション問題を持つ人がいるので、ファイルのディレクトリにスペースを利用しないことは良い考えです。You will have to change several paths in the httpd.conf file.
    • You also have to uncomment the line in httpd.conf that says #ServerName localhost:80 (or something similar), and add an additional #ServerName <host>:80 for each way you want to access it (where <host> is the local IP for access from your local net, DNS name or IP address for access from the Internet).

MySQL[edit]

MySQL 5.0 Community Edition を利用します。Windows用のインストーラファイルは16.4MBで、このインストーラが使用されました。

  1. ファイヤーウォールもしくはアンチウィルスソフトをオフにして下さい。これらによって生活費が稼げなくなったりインストールを正しく出来なくなったりすることがあります。
  2. インストーラを実行して、典型的なインストレーションを利用して下さい。例えばD:\programme\MySQL\MySQLServer5.0です。
  3. インストレーションが終わった直後に、ウィザードは設定をすることを提案します。利用する場合、次のような設定をします:
    • 標準的なコンフィギュレーション(このコンピュータ上で他のMySQLは無し)
    • サービスとして実行する
    • binパスをチェックしない、
      Bulbgraph.png Note:
      Other guides (e.g. http://oss.segetech.com/wamp.html) suggest that it is absolutely necessary to check bin paths. My setup was not working (I got the "Could not find a suitable database driver!" error) and reconfigured MySQL to check bin paths; after a restart it worked. Unfortunately I had changed other settings so I can't be sure this was the problem.
    • rootのパスワードを入力します
      Bulbgraph.png 注意:
      ルートユーザーは"root"という名前を保有しており、MediaWikiのインストレーションスクリプトは初期のインストレーションの間に問題を持つことになります。
    • 匿名のアカウントは無しです
    • 終わりに、MySQLにコンフィギュレーションの処理をさせます。
      Bulbgraph.png 注意:
      ポート3306は現在のサブネットに対して開かれてなければなりません。さもなければコンフィギュレーションができません。ポートが開き処理が始まっている間はウィザードが開いてます。MySQLは57MBのディスクスペースを占めます。
  4. Windowsコマンドプロンプトを開くことでインストレーションをテストし、MySQLサーバサービスを起動させる場合はNET START MYSQLを、停止させるときはNET STOP MYSQLを入力します。

PHP[edit]

zip化されたスナップショットのバージョン (9 MB, 20 MB unzipped)を利用します。CGIスクリプトは動作しますが、zipバージョンはすべての必要なファイルを含み、追加ダウンロードが必要ありませんのでお勧めです。

  1. フォルダに解凍します。例えばD:/programme/phpです (以降は<php-folder>と呼ぶことにします)
  2. <php-folder>にあるphp.ini-recommendedファイルをphp.iniにリネームします
    Bulbgraph.png 注記:
    Windows XPでインストールした場合次の設定で動作しました:
    php.ini-recommendedを[Apache installation path]\conf\php.iniにコピーしました
    --Myscha (novawoman@hotmail.com)
  3. php.iniファイルを開きます:
    1. ファイルの真ん中近くでextension_dirディレクティブを変更して、extension_dir = "./ext/"にします(もしくは異なるフォルダにエクステンションをインストールした場合は異なる値になります)
    2. それぞれの冒頭にあるセミコロンを削除してphp_mysql.dllphp_mysqli.dllをアンコメントします(かなり後方から離れていて、"Windows extensions"の見出しの下です)
  4. ApacheサーバにPHPをモジュールとして接続するために、httpd.conf(<apache>/confフォルダにあります)ファイルの最後の行に次のテキストを追加して変更しなければなりません:
    Manual:Streamlined Windows Install Guide/ja/php text
    Don't forget to change both instances of <php-folder> to the actual path of your PHP folder
  5. In httpd.conf file,the entry DirectoryIndex index.html needs to be expanded to: DirectoryIndex index.html index.php index.php3 index.php4 index.php5
  6. PATH変数にセミコロンを追加し、その後にPHPの<php-folder>ディレクトリを追加します。そのために"My Computer"を右クリックをしてシステムコントロールパネルダイアログを提示します。これをしたらサブステップ3をスキップすることが出来ます:
    1. Start Menuを開き、Settings/Controlパネルを指定します。
    2. クラシックビューから"System"を選択します。
    3. Select the "Advanced"タグを選択します
    4. "Environmental variables"をクリックします
    5. "System"セクションで、PATH変数を探します
    6. "edit"をクリックします
    7. 上記で説明されているように;<php-folder>を入力してPHPエントリを変数に追加します。
  7. Restart the computer, as it is necessary at this point.

phpMyAdmin[edit]

While not necessary, phpMyAdmin is an extremely useful utility for management of the database created for your wiki.

  1. インストーレションファイルをダウンロードします。
  2. <apache-folder>/htdocsに解凍します (もしくはApacheのサーバドキュメントルートとして設定されたフォルダ)(これ以降<apache data diretory>と書きます).
  3. 新しいディレクトリを、例えば/phpmyadminといった覚えやすいものにリネームします。zipは3.7MBで解凍されたものは12.5MBです
  4. For using phpMyAdmin, open a browser of your choice and type the phpMyAdmin URL. For example, if your apache server is running as http://localhost, and you renamed your <phpMyAdmin-folder> to phpmyadmin then type http://localhost/phpmyadmin.
    注 : phyMyAdmin tries to login to user 'root' without any password, so if a password is given for "root" user during the MySQL installation, go to <phpMyAdmin-folder> and rename "config.sample.inc.php" file to "config.inc.php" file. Open it and change "blowfish_secret" from blank to any non-blank string, and then browse the url; now it will ask for a username and password.
    Do not change "blowfish_secret", but the string value it equates to, e.g. $cfg['blowfish_secret'] = 'Test';

MediaWiki[edit]

MediaWikiのリリースをダウンロードします。パッチと開発のヘルプを提供するために探している場合、SVNからのバージョンを利用します; エンドユーザーで、最新の機能にそれほど関心がないのでしたら、安定版リリースをダウンロードして下さい。

  1. Unzip your downloaded copy into a folder and then copy the folder to <apache-folder>/htdocs (one can also directly unzip to <apache-folder>/htdocs). Unzipping is usually done with software such as 7-Zip (free), WinZip, WinRAR or IZArc (free).
  2. Rename the new directory created under <apache-folder>/htdocs to whatever you would like to have in the URL. If your apache server is running as http://localhost for example, unzipping/installing MediaWiki to /testwiki/ directory would mean you would access your wiki at http://localhost/testwiki which will lead to http://localhost/testwiki/index.php/Main_Page or http://localhost/testwiki/index.php?title=Main_Page (PHP running as a CGI module) kind of URL.
    注 : If you want to have short/pretty URL like Wikipedia see Short URL for details.
  3. Now setup needs to be done to do that open a browser of your choice and type in the URL from above, a page will appear that tells you to Please set up the wiki first as a link.
  4. Clicking the link will open a page having a form. Fill the form and then click Install MediaWiki! button at the bottom of the form. The rest is done automatically (see Manual:Config script for details on filling up the form).
  5. セットアップが終了した後で、コンフィギュレーションファイルをサブディレクトリから親ディレクトリに移動させるように言われます。

ウィキがインストールされました。タイムスパン: すべてがうまくいったなら、(接続状況がよければ ;-))ダウンロードも含めて30分もかかりません

トラブルシューティング[edit]

  • "Could not find a suitable database driver! * For MySQL, compile PHP using --with-mysql, or install the mysql.so module" というエラーを受け取る場合、php_mysql.dlllibmysql.dllファイルはApacheに受け入れ可能であることを確認して下さい。wikiを動かすための一つの方法は<apache-folder>\binディレクトリに設置することです。
    • No, this does not work - neither of proposed solutions.
  • Apacheがphp.iniを見つけることが出来ない場合、ハードドライブにあるWindowsフォルダに設置されているからかもしれません。httpd.confがそれがある場所を指定しているか確認して下さい。
  • Windows XPを利用している場合、このページのPHPセクションで説明されたように、PHPをインストールしたディレクトリをPath環境変数に追加する必要があるかもしれません。
  • 必要なポートが開いていますか?(80はApache、3306はMySQL)
  • Apacheが空ではないパス上にインストールされているか?
  • Did you empty your browser cache and refresh the wiki page?
  • You can avoid many problems if you can install in folders without spaces, such as "C:\Apache", "C:\PHP", "C:\MySQL", and test PHP in a command line window with a "C:\PHP\php -version" command. If you have oci.dll errors, open php.ini and comment the [PHP_OCI8], [PHP_OCI8_11G], and [PHP_PDO_OCI] references.

ウィキのバックアップと移動[edit]

This works for me. As always, please be bold in adding\modifying steps:

バックアップ[edit]

  • In SQL admin, go to the wiki database (typically wikidb), and click Export. Check the first box under "structure" (DROP TABLES), and check the "save as file" checkbox near the bottom. Click Go and save the file to the back-up drive.
  • Save the wiki folder from htdocs to the back-up drive. This is "Mediawiki x.x.x" by default but typically it is renamed to "wiki"

新しいサーバーへの転送[edit]

  • Install XAMPP on the new server.
  • In SQL admin:
    • (optional but important for security) Give root a password (from the privileges tab). This password will need to be reflected in your config.inc.php file in xampp\phpmyadmin:
$cfg['Servers'][$i]['password']             = 'myPass';
$cfg['Servers'][$i]['AllowNoPassword']      = false;
    • Create a new blank database (e.g. wikidb) with the default options and a name of your choice.
    • Import the database file you backed-up.
    • Change the SQL password of the root for that db (in privileges tab)
  • Copy the wiki folder from back-up into the htdocs folder.
  • Change localsettings.php to reflect the new db username and password.

関連項目[edit]

言語: English  • 日本語