Installation using a command line interface (CLI)/ja: Difference between revisions
From LimeSurvey Manual
Bravehorse (talk | contribs) (Created page with "<source lang="bash"> cd /var/www/limesurvey/application/commands php console.php </source> これにより、 <pre> Yii command runner (based on Yii v1.1.14) Usage: console.ph...") |
Bravehorse (talk | contribs) (Created page with "== 構文 == <pre> php console.php <Adminユーザー名> <Adminユーザーパスワード> <名前> <メールアドレス> </pre>") |
||
Line 35: | Line 35: | ||
</pre> | </pre> | ||
== | == 構文 == | ||
<pre> | <pre> | ||
php console.php < | php console.php <Adminユーザー名> <Adminユーザーパスワード> <名前> <メールアドレス> | ||
</pre> | </pre> | ||
Revision as of 09:57, 16 June 2018
はじめに
インストールを自動化する(仮想マシンセットアップなど)には、LimeSurvey(v2.X)のCLI(コマンドラインインターフェース)を使うと効果的です。この目的(パスワードのリセットも同様)で使用するファイルは、WEBROOT/application/commandsフォルダーのconsole.phpです。
要件
- PHP CLIが使えること
- WEBROOT/application/config/config.phpが利用可能で、自動インストールプロセスで提供されたパラメーターが設定されていること
- PHPモジュールのアクセス許可が、LimeSurveyのニーズに合致していること
- 空のMySQLデータベースが作成され、そのユーザーが適切な権限を持つこと
使い方
説明のため、WEBROOTが/var/www/limesurveyであると想定します。
cd /var/www/limesurvey/application/commands
php console.php
これにより、
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>
構文
php console.php <Adminユーザー名> <Adminユーザーパスワード> <名前> <メールアドレス>
- 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.