Manual:Streamlined Windows Install Guide/ja
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.)
- 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.
- MediaWikiをダウンロードして展開します。
- 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/mywikiand 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.
- 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]
- Run Your Personal Wikipedia from a USB Stick, uses XAMPP
- NetBeans Guide to Configuring PHP Development Environment in Windows using XAMPP
- How to set up MediaWiki within XAMPP
段階を追ったセットアップ[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です。
- ファイルをダウンロードして実行します。インストレーションウィザードで次の設定を利用します:
- サービスとしてインストールします,
- domainフィールドに何らかのドメイン、servernameにサーバ名、そしてemailフィールドに適切な電子メールアドレスを入力して下さい。
- サービスとしてすべてのユーザーのために"typical installation"を選択して下さい、
- 例えば、
C:\Program Files\apache\apache2.2\にインストールします(ここでは、このフォルダを<apache-folder>と表記します)。
注: ユーザーの中にはスペースを含むファイルパスに関するインストレーション問題を持つ人がいるので、ファイルのディレクトリにスペースを利用しないことは良い考えです。You will have to change several paths in the httpd.conffile.- You also have to uncomment the line in
httpd.confthat says#ServerName localhost:80(or something similar), and add an additional#ServerName <host>:80for 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で、このインストーラが使用されました。
- ファイヤーウォールもしくはアンチウィルスソフトをオフにして下さい。これらによって生活費が稼げなくなったりインストールを正しく出来なくなったりすることがあります。
- インストーラを実行して、典型的なインストレーションを利用して下さい。例えば
D:\programme\MySQL\MySQLServer5.0です。 - インストレーションが終わった直後に、ウィザードは設定をすることを提案します。利用する場合、次のような設定をします:
- 標準的なコンフィギュレーション(このコンピュータ上で他のMySQLは無し)
- サービスとして実行する
- binパスをチェックしない、
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のパスワードを入力します
- 匿名のアカウントは無しです
- 終わりに、MySQLにコンフィギュレーションの処理をさせます。
- Windowsコマンドプロンプトを開くことでインストレーションをテストし、MySQLサーバサービスを起動させる場合は
NET START MYSQLを、停止させるときはNET STOP MYSQLを入力します。
PHP[edit]
zip化されたスナップショットのバージョン (9 MB, 20 MB unzipped)を利用します。CGIスクリプトは動作しますが、zipバージョンはすべての必要なファイルを含み、追加ダウンロードが必要ありませんのでお勧めです。
- フォルダに解凍します。例えば
D:/programme/phpです (以降は<php-folder>と呼ぶことにします) <php-folder>にあるphp.ini-recommendedファイルをphp.iniにリネームしますphp.iniファイルを開きます:- ファイルの真ん中近くで
extension_dirディレクティブを変更して、extension_dir = "./ext/"にします(もしくは異なるフォルダにエクステンションをインストールした場合は異なる値になります) - それぞれの冒頭にあるセミコロンを削除して
php_mysql.dllとphp_mysqli.dllをアンコメントします(かなり後方から離れていて、"Windows extensions"の見出しの下です)
- ファイルの真ん中近くで
- 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
- In httpd.conf file,the entry
DirectoryIndex index.htmlneeds to be expanded to:DirectoryIndex index.html index.php index.php3 index.php4 index.php5 PATH変数にセミコロンを追加し、その後にPHPの<php-folder>ディレクトリを追加します。そのために"My Computer"を右クリックをしてシステムコントロールパネルダイアログを提示します。これをしたらサブステップ3をスキップすることが出来ます:- Start Menuを開き、Settings/Controlパネルを指定します。
- クラシックビューから"System"を選択します。
- Select the "Advanced"タグを選択します
- "Environmental variables"をクリックします
- "System"セクションで、
PATH変数を探します - "edit"をクリックします
- 上記で説明されているように
;<php-folder>を入力してPHPエントリを変数に追加します。
- 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.
- インストーレションファイルをダウンロードします。
<apache-folder>/htdocsに解凍します (もしくはApacheのサーバドキュメントルートとして設定されたフォルダ)(これ以降<apache data diretory>と書きます).- 新しいディレクトリを、例えば
/phpmyadminといった覚えやすいものにリネームします。zipは3.7MBで解凍されたものは12.5MBです - 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>tophpmyadminthen typehttp://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からのバージョンを利用します; エンドユーザーで、最新の機能にそれほど関心がないのでしたら、安定版リリースをダウンロードして下さい。
- 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). - Rename the new directory created under
<apache-folder>/htdocsto whatever you would like to have in the URL. If your apache server is running ashttp://localhostfor example, unzipping/installing MediaWiki to/testwiki/directory would mean you would access your wiki athttp://localhost/testwikiwhich will lead tohttp://localhost/testwiki/index.php/Main_Pageorhttp://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. - 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.
- 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).
- セットアップが終了した後で、コンフィギュレーションファイルをサブディレクトリから親ディレクトリに移動させるように言われます。
ウィキがインストールされました。タイムスパン: すべてがうまくいったなら、(接続状況がよければ ;-))ダウンロードも含めて30分もかかりません
トラブルシューティング[edit]
- "Could not find a suitable database driver! * For MySQL, compile PHP using --with-mysql, or install the mysql.so module" というエラーを受け取る場合、
php_mysql.dllとlibmysql.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.dllerrors, openphp.iniand 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]
- Manual:$wgEnableUploads to enable image/files upload.
- Manual:Timezone to set default timezone of your wiki from UTC/GMT to your timezone. This reflects in History tab and other places.
- Extension:Cite/Cite.php, install this extension so that <ref> and </ref> tags work as expected.
- Manual:Short URL for having more user friendly url to article pages.
- Manual:Configuring MediaWiki for links to more advanced configuration.
- Manual:Wiki family to setup multiple instances of MediaWiki with single set of MediaWiki files.
| 言語: | English • 日本語 |
|---|
