Actions

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

From LimeSurvey Manual

(Created page with "コマンドラインインターフェース(CLI)によるインストール")
 
(Created page with "次のように出力されます。 <pre> /var/www/limesurvey/installer/sql/create-mysql.sql </pre> の時点でデータベースはこ適切にインストールされて...")
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
<languages />
<languages />


== Introduction ==
== はじめに ==
When doing automated installs (e.g. in a virtual machine setup), we can use LimeSurvey's (v2.x referred to here) CLI (command-line interface) to good effect. The files used for this purpose (and for resetting passwords as well) are in the '''WEBROOT/application/commands''' folder, the one of interest here being '''console.php'''.
インストールを自動化する(仮想マシンセットアップなど)には、LimeSurvey(v2.X)のCLI(コマンドラインインターフェース)を使うと効果的です。この目的(パスワードのリセットも同様)で使用するファイルは、'''WEBROOT/application/commands'''フォルダーの'''console.php'''です。


== Pre-requisites ==
== 要件 ==
* PHP CLI should be available
* PHP CLIが使えること
* '''WEBROOT/application/config/config.php''' should be available and populated with the parameters provided by the automated installation process.
* '''WEBROOT/application/config/config.php'''が利用可能で、自動インストールプロセスで提供されたパラメーターが設定されていること
* The availablity of the PHP Modules permissions should match the needs of '''LimeSurvey'''.
* PHPモジュールのアクセス許可が、'''LimeSurvey'''のニーズに合致していること
* An empty MySQL database should be created and the user should have the proper privileges in order to use it.
* 空の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">
Line 17: Line 17:
php console.php
php console.php
</source>
</source>
This will show:
これにより、
<pre>
<pre>
Yii command runner (based on Yii v1.1.14)
Yii command runner (based on Yii v1.1.14)
Line 35: Line 35:
</pre>
</pre>


== Syntax ==
== 構文 ==
<pre>
<pre>
php console.php <Admin User Name> <Admin User Password> <Full Name> <EMail ID>
php console.php <Adminユーザー名> <Adminユーザーパスワード> <名前> <メールアドレス>
</pre>
</pre>


* 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.
* DB名、DBタイプ、DBユーザー、DBパスワードなど、その他のパラメータはすべて、スクリプト実行前にconfig.phpファイルに設定されます。
* The script should be executed from and in the '''WEBROOT/application/commands''' folder only.
* スクリプトは、'''WEBROOT/application/commands'''フォルダーからのみ実行されます。


== Example ==
== ==
<source lang="bash">
<source lang="bash">
cd /var/www/limesurvey/application/commands
cd /var/www/limesurvey/application/commands
Line 50: Line 50:
</source>
</source>


outputs the following text:
次のように出力されます。
<pre>
<pre>
/var/www/limesurvey/installer/sql/create-mysql.sql
/var/www/limesurvey/installer/sql/create-mysql.sql
</pre>
</pre>
and the database should be properly installed at the moment.
の時点でデータベースはこ適切にインストールされている必要があります。

Latest revision as of 10:01, 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ユーザーパスワード> <名前> <メールアドレス>
  • 名前とパスワードがスペースや特殊文字を含んでいる場合はダブルクオートで囲みます。
  • 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

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