Installation using a command line interface (CLI)/ja: Difference between revisions
From LimeSurvey Manual
Bravehorse (talk | contribs) (Created page with "== はじめに == インストールを自動化する(仮想マシンセットアップなど)には、LimeSurvey(v2.X)のCLI(コマンドラインインターフ...") |
Bravehorse (talk | contribs) (Created page with "== 要件 == * PHP CLIが使えること * '''WEBROOT/application/config/config.php'''が利用可能で、自動インストールプロセスで提供されたパラメー...") |
||
Line 4: | Line 4: | ||
インストールを自動化する(仮想マシンセットアップなど)には、LimeSurvey(v2.X)のCLI(コマンドラインインターフェース)を使うと効果的です。この目的(パスワードのリセットも同様)で使用するファイルは、'''WEBROOT/application/commands'''フォルダーの'''console.php'''です。 | インストールを自動化する(仮想マシンセットアップなど)には、LimeSurvey(v2.X)のCLI(コマンドラインインターフェース)を使うと効果的です。この目的(パスワードのリセットも同様)で使用するファイルは、'''WEBROOT/application/commands'''フォルダーの'''console.php'''です。 | ||
== | == 要件 == | ||
* PHP | * PHP CLIが使えること | ||
* '''WEBROOT/application/config/config.php''' | * '''WEBROOT/application/config/config.php'''が利用可能で、自動インストールプロセスで提供されたパラメーターが設定されていること | ||
* | * PHPモジュールのアクセス許可が、'''LimeSurvey'''のニーズに合致していること | ||
* | * 空のMySQLデータベースが作成され、そのユーザーが適切な権限を持つこと | ||
== Usage == | == Usage == |
Revision as of 09:54, 16 June 2018
はじめに
インストールを自動化する(仮想マシンセットアップなど)には、LimeSurvey(v2.X)のCLI(コマンドラインインターフェース)を使うと効果的です。この目的(パスワードのリセットも同様)で使用するファイルは、WEBROOT/application/commandsフォルダーのconsole.phpです。
要件
- PHP CLIが使えること
- WEBROOT/application/config/config.phpが利用可能で、自動インストールプロセスで提供されたパラメーターが設定されていること
- PHPモジュールのアクセス許可が、LimeSurveyのニーズに合致していること
- 空のMySQLデータベースが作成され、そのユーザーが適切な権限を持つこと
Usage
For illustration purposes, we assume in our example the WEBROOT to be /var/www/limesurvey.
cd /var/www/limesurvey/application/commands
php console.php
This will show:
Yii command runner (based on Yii v1.1.14) Usage: console.php <command-name> [parameters...] The following commands are available: - install - message - migrate - plugin - resetpassword - shell - webapp To see the individual command help, use the following: console.php help <command-name>
Syntax
php console.php <Admin User Name> <Admin User Password> <Full Name> <EMail ID>
- The Full Name and Password are enclosed in double quotes if they contain spaces or other special characters.
- All the other parameters like DB Name, DB Type, DB User, DB Password etc. are to be populated in the config.php file before script execution.
- The script should be executed from and in the WEBROOT/application/commands folder only.
Example
cd /var/www/limesurvey/application/commands
php console.php install limeadmin pwd123 Admin admin@mydomain.com
outputs the following text:
/var/www/limesurvey/installer/sql/create-mysql.sql
and the database should be properly installed at the moment.