Jump to content

Manual:install.php

From mediawiki.org
This page is a translated version of the page Manual:Install.php and the translation is 71% complete.

詳細

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 at the default location. この設定はこのスクリプトには影響せず、無視されます。 Use --confpath instead.
--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

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

Name Description Default
--confpath Path to write LocalSettings.php to value corresponding to $IP, i.e. the path of your installation's root folder.

You can use --help to find the default value.

--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 (not for SQLite)
--dbschema PostgreSQL/Microsoft SQL サーバ上の MediaWiki データベースのスキマ mediawiki
--dbserver データベースのホスト localhost
--dbtype データベースの種類 mysql
--env-checks 環境検査のみ実行、どこも変更してはいけません
--installdbpass データベースユーザがインストールするためのパスワード
--installdbuser インストール担当の利用者名 root
--lang 使用言語 en
--pass ウィキ管理者のパスワード
--passfile パスのオプションとなる代替手段、このファイルのコンテンツを対象とする
--scriptpath ウェブサーバ上のウィキの相対パス /wiki
--skins インストール対象の外装をカンマ区切りの一覧で記述 all
--with-extensions 拡張機能を検出して追加
--with-developmentsettings Load DevelopmentSettings.php in LocalSettings.php MediaWiki 1.42change 977136 以降

引数

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

ウィキの設定は、ウィキ用の新規データベース「Wiki 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"