Manual:install.php
| MediaWiki ファイル: install.php | |
|---|---|
| 場所: | maintenance/ |
| ソース コード: | master • 1.45.1 • 1.44. • 1.39.16 |
| クラス: | CommandLineInstaller |
詳細
install.php ファイルは、MediaWiki のインストールと構成を行うための CLI ベースのメンテナンス スクリプトです。
このスクリプトは新規の LocalSettings.php を作成し、指定されたデータベースにデータを入力します。
既に LocalSettings.php ファイルが存在する場合は中断され、そのファイルから既存の設定を読み取れません。
使用法
php maintenance/run.php install [--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 which by default, corresponds to $IP, i.e. the path of your installation's root folder. You can use --help to find the default value.
You may want to use this if you are adding a new wiki to a wiki family.
After the file has been generated, you can add a LocalSettings.php to the root folder that directs web requests to the wiki-specific LocalSettings.php in your custom path. Do not add it before the file has been generated: regardless what |
| --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.42 • change 977136 以降 |
引数
| <name> | ウィキの名称 |
| <admin> | ウィキ管理者の利用者名 |
例
ウィキの設定は、ウィキ用の新規データベース「Wiki Name」を作成するための必要な権限を持つユーザーと、ウィキを運営するためのユーザー「Admin」を使用して行ってください。
php maintenance/run.php install \
--dbname=wikidb \
--dbserver="localhost" \
--installdbuser=root \
--installdbpass=rootpassword \
--dbuser=dbusername \
--dbpass=dbuserpassword \
--server="http://wiki.example.com/" \
--scriptpath=/w \
--lang=en \
--pass=Adminpassword "Wiki Name" "Admin"
See also
- installPreConfigured.php - alternative install script introduced in MediaWiki 1.44 which retrieves configuration details from an existing LocalSettings.php.