Actions

コマンドラインインターフェース(CLI)によるインストール

From LimeSurvey Manual

The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
This page is a translated version of the page Installation using a command line interface (CLI) and the translation is 100% complete.

はじめに

インストールを自動化する(仮想マシンセットアップなど)には、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ユーザーパスワード> <名前> <メールアドレス>
  • 名前とパスワードがスペースや特殊文字を含んでいる場合はダブルクオートで囲みます。
  • DB名、DBタイプ、DBユーザー、DBパスワードなど、その他のパラメータはすべて、スクリプト実行前にconfig.phpファイルに設定されます。
  • スクリプトは、WEBROOT/application/commandsフォルダーからのみ実行されます。

cd /var/www/limesurvey/application/commands
php console.php install limeadmin pwd123 Admin admin@mydomain.com

次のように出力されます。

/var/www/limesurvey/installer/sql/create-mysql.sql

の時点でデータベースはこ適切にインストールされている必要があります。