Manual:install.php

From mediawiki.org
This page is a translated version of the page Manual:Install.php and the translation is 69% complete.
Outdated translations are marked like this.

詳細

install.php ファイルは、MediaWiki のインストールと構成を行うための CLI ベースのメンテナンス スクリプトです。

このスクリプトは新規のLocalSettings.phpを作成します。 既に LocalSettings.php ファイルが存在する場合は中断され、そのファイルから既存の設定を読み取れません。


使用法

php install.php [--conf|--confpath|--dbgroupdefault|--dbname|--dbpass|--dbpassfile|--dbpath|--dbport|--dbprefix|--dbschema|--dbserver|--dbtype|--dbuser|--env-checks|--globals|--help|--installdbpass|--installdbuser|--lang|--memory-limit|--pass|--passfile|--profiler|--quiet|--scriptpath|--server|--skins|--wiki|--with-extensions] <name> <admin>

The tables below explain the various options and arguments. The default values for the options are indicated in parentheses.

汎用保守パラメータ
--help (-h) このヘルプ メッセージを表示
--quiet (-q) 非エラーの出力を抑制するかどうか
--conf Location of LocalSettings.php, if not default この設定はこのスクリプトには影響せず、無視されます。
--wiki ウィキ ID を指定する場合用
--globals 処理の最後にデバッグ用にグローバル変数を出力します
--memory-limit Set a specific memory limit for the script, "max" for no limit or "default" to avoid changing it
--server The protocol and server name to use in URLs, e.g. https://en.wikipedia.org. This is sometimes necessary because server name detection may fail in command line scripts.
--profiler Profiler output format (usually "text")

スクリプト依存のパラメーター

--dbuser The DB user to use for this script. This value appears in LocalSettings.php for $wgDBuser . If --installdbuser and --installdbpass are given, this value will be used to create a new account
--dbpass The password to use for this script. This value appears in LocalSettings.php for $wgDBpassword . If --installdbuser and --installdbpass are given, this value will be used to create a new account
--dbgroupdefault The default database group to use

スクリプト固有のパラメーター

--confpath Path to write LocalSettings.php to (/var/www/)
--dbname データベース名 (my_wiki)
--dbpassfile An alternative way to provide dbpass option, as the contents of this file
--dbpath The path for the SQLite DB ($IP/data)
--dbport The database port; only for PostgreSQL (5432)
--dbprefix Optional database table name prefix
--dbschema PostgreSQL/Microsoft SQL サーバ上の MediaWiki データベースのスキマ (mediawiki)
--dbserver データベースのホスト (localhost)
--dbtype データベースの種類 (mysql)
--env-checks 環境検査のみ実行、どこも変更してはいけません
--installdbpass データベースユーザがインストールするためのパスワード
--installdbuser インストール担当の利用者名 (root)
--lang 使用言語 (en)
--pass ウィキ管理者のパスワード
--passfile パスのオプションとなる代替手段、このファイルのコンテンツを対象とする
--scriptpath ウェブサーバ上のウィキの相対パス (/wiki)
--skins インストール対象の外装をカンマ区切りの一覧で記述 (default: all)
--with-extensions 拡張機能を検出して追加
--with-developmentsettings Load DevelopmentSettings.php in LocalSettings.php (MW 1.42 Gerrit change 977136 以降)


引数

<name> ウィキの名称
<admin> ウィキ管理者の利用者名


ウィキの設定は、要件を満たす利用者として当該のウィキが使う新規データベース開設の権限を備えた人と、ウィキ運営担当者を揃えて取り掛かってください。

php maintenance/install.php --dbname=wikidb --dbserver="localhost" --installdbuser=root --installdbpass=rootpassword --dbuser=dbusername --dbpass=dbuserpassword --server="http://wiki.domain.name/" --scriptpath=/w --lang=en --pass=Adminpassword "Wiki Name" "Admin"