Actions

Installation using a command line interface (CLI)/ja: Difference between revisions

From LimeSurvey Manual

(Created page with "== 要件 == * PHP CLIが使えること * '''WEBROOT/application/config/config.php'''が利用可能で、自動インストールプロセスで提供されたパラメー...")
(Created page with "== 使い方 == 説明のため、'''WEBROOT'''が'''/var/www/limesurvey'''であると想定します。")
Line 10: Line 10:
* 空のMySQLデータベースが作成され、そのユーザーが適切な権限を持つこと
* 空のMySQLデータベースが作成され、そのユーザーが適切な権限を持つこと


== Usage ==
== 使い方 ==
For illustration purposes, we assume in our example the '''WEBROOT''' to be '''/var/www/limesurvey'''.
説明のため、'''WEBROOT''''''/var/www/limesurvey'''であると想定します。


<source lang="bash">
<source lang="bash">

Revision as of 09:55, 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

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.