x

主要章節

  1. LimeSurvey Cloud 與 LimeSurvey CE 的差異
  2. 快速入門指南 - LimeSurvey 3.0+
  3. 安裝 - LimeSurvey CE
  4. 如何設計一份好的問卷(指南)
  5. 入門指南
  6. 管理 LimeSurvey
  7. 問卷 - 簡介
  8. 問卷設定
  9. 問卷選單
  10. 問卷結構
  11. 問題簡介
  12. 題組 - 簡介
  13. 問卷管理
  14. 問卷工具列選項
  15. 多語言問卷
  16. ExpressionScript 引擎 - 快速入門指南
  17. 未分類及進階功能
  18. 常見問題
  19. 疑難排解
  20. 應變方案
  21. 授權條款
  22. 版本更改紀錄檔
  23. 外掛程式
 Actions

使用命令列介面 (CLI) 安裝

From LimeSurvey Manual

本頁面可能為機器翻譯,可能包含錯誤。 檢視英文原文 · 改善此翻譯
This page is a translated version of the page Installation using a command line interface (CLI) and the translation is 100% complete.

簡介

在進行自動化安裝時(例如在虛擬機器環境中),我們可以善用 LimeSurvey 的 CLI(命令列介面,此處指 v2.x 版本)。用於此目的(以及重設密碼)的檔案位於 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 User Name> <Admin User Password> <Full Name> <EMail ID>
  • 若全名和密碼包含空格或其他特殊字元,請以雙引號括住。
  • 所有其他參數(如資料庫名稱、資料庫類型、資料庫使用者、資料庫密碼等)必須在執行指令碼之前填入 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

此時資料庫應已正確安裝。