安裝 - LimeSurvey CE
From LimeSurvey Manual
概觀
LimeSurvey 提供了兩種安裝的方法:
- 在您的網頁伺服器上:
在這種情況下,需從步驟 1 開始按照本頁上的說明進行操作。
- 在您的本機 Windows PC 上:
如果您想在自己的電腦建立問卷(主要是出於速度、開發或測試原因)並在稍後將其佈署到您的網頁伺服器上,通常只需在本機 PC 上安裝 LimeSurvey。為此,我們準備了一個特殊的 LimeSurvey 安裝包,其中包括網頁伺服器、資料庫、LimeSurvey 應用程式和 如何安裝的說明。
確認 LimeSurvey 能夠在您的伺服器上執行
確認伺服器符合以下所有需求:
LimeSurvey 6.x的最低需求:
- 至少 250MB 硬碟空間
- MariaDB 10.3.38 或更高版本 或 MySQL 8 或更高版本 或 Microsoft SQL Server 2008 或更高版本 或 Postgres 12 或更高版本。
- PHP 版本需求:
- LS 6.x 需 PHP 7.4.x ~ 8.x
- LS 5.x 需 PHP 7.2.5 ~ 8.0.x
- LS 3.x 需 PHP 5.5.9 ~ 7.4.x
- php.ini 裡 `short_open_tag` 參數設定需設為 `ON`
- 以下的 PHP 模組/擴充功能庫需啟用:
- mbstring (Multibyte String Functions) 擴充功能庫
- 在Windows環境 需要 MySQL 的PDO驅動程式庫 (pdo_mysql 或 pdo_mysqli) 或 Postgres (pdo_pgsql) 或 MSSQL (pdo_sqlsrv 而 Linux環境需要 pdo_dblib )。
- 還有, 我們建議常用的PHP程式庫都應該啟用
- hash
- session
- openssl or mcrypt
- fileinfo
- SimpleXML
- 等等…
選擇性PHP擴充:
- GD-Library with FreeType support 需安裝才能使用驗證碼、漂亮的統計圖或透過HTML編輯器上傳圖片 - 請參閱PHP GD-Library Extension documentation
- IMAP (pretty standard) 需安裝才能使用 電子郵件退回追蹤系統 - 請參閱PHP IMAP Extension documentation
- LDAP 需安裝才能透過LDAP匯入問卷參與者 - 請參閱PHP LDAP Documentation
- Zip (pretty standard) 需安裝才能使用模板上傳、.zip 資源匯入和 Excel 匯出 - 請參閱PHP Zip Extension documentation
- Zlib(pretty standard)需安裝才能使用 ComfortUpdate - 請參閱PHP Zlib Extension documentation
在大多數情況下,您的網頁伺服器供應商或系統管理員能夠協助您解決這些選用元件的問題。
如果您想透過 Microsoft 的 IIS 執行,請查看 Installation on XP with IIS 可能也會有所幫助。
瀏覽器相容性
對於問卷填寫方, 我們目前支援 IE11 (除了相容性模式) 和其他較新的瀏覽器如 Edge, FireFox, Chrome, Opera 等等,並需啟用JavaScript。
對於問卷管理方,我們目前支援 Edge 和所有較新的瀏覽器,如 FireFox、Chrome、Opera 等等,並需啟用 JavaScript。問卷管理者部份我們不再支援任何 Internet Explorer 版本。
螢幕尺寸
對於問卷填寫方我們支援任何螢幕尺寸(360px x 640px 還有以上)。 對於問卷管理方最小支援尺寸是1280px x 1024px。
LimeSurvey 託管
LimeSurvey 應該能夠執行於大多數提供 PHP 和 MySQL 的伺服器供應商。如果您想要找現成的 LimeSurvey 版本,您可以嘗試 LimeSurvey Cloud,或參考我們的LimeSurvey相容託管供應商清單。
下載 LimeSurvey 套件
下載最新穩定的 LimeSurvey zip 安裝套件(您也可以選用 gzip、bz2 和 7zip 套件)並將其儲存到本機磁碟中。
解壓縮 LimeSurvey 套件
採用你慣用的壓縮軟體以預設目錄/資料夾的方式解壓縮 zip 格式的軟體包。請一併解壓縮軟體包原來預設的目錄結構及相關檔案).
目錄使用權限
- 程序 admin 目錄需要有 '寫入' 權限來導入問卷. "/limesurvey/tmp" 目錄用作上傳文件,所以要設定可讀取/可寫入的狀態. 在 linux 或 unix 它應該 chmod 到 775.
收集您伺服器的資訊
你需要符合以下條件才可以正確安裝 LimeSurvey.
- 你要建立 limesurvey 的網址URL來存放它的源程序 (ie: 'http://my.domain.com/limesurvey')
- limesurvey 在伺服器所在的實質位置 (ie: '/home/usr/htdocs/limesurvey')
- 你的 MySQL 資料庫的 IP/網路位置 (ie:'localhost')
- 如果您的 MySQL 資料庫使用非標準連接埠, 您就要找出埠號.
- 你的 MySQL 資料庫使用的使用者名稱及密碼
- 如果您的網路伺服器是使用 Windows 作業系統, 請當試找出 mysql bin 檔案的存放位置. (ie: 'c:/mysql/bin')
將檔案上傳到您的網頁伺服器
使用自己的文字編輯器修改 /limesurvey/目錄內的 config.php 文件檔,下列設定要加以調整:
設定目錄權限
For the script to work properly it needs certain access to some directories - this applies especially to Linux/*nix systems.
- The "/limesurvey/tmp" directory (and all its subdirectories and files) are used for imports & uploads and should be set to Read & Write for your webserver.
- The "/limesurvey/upload/" directory (and all its subdirectories and files) must also have Read & Write for your webserver in order to enable picture and media files upload.
- The "/limesurvey/application/config/" directory also needs Read & Write permissions for your webserver.
- The other directories can be set to Read Only. You may wish in Linux/Unix to set the permissions on each file within the /limesurvey/admin directory to Read Only.

建立資料庫使用者
LimeSurvey will create a database and the tables inside it. To be able to do this, it will need the user name and password of a database user. We generally recommend creating a database user with the following permissions:
- MySQL: SELECT, CREATE, INSERT, UPDATE, DELETE, ALTER, DROP, INDEX
- PostgreSQL: SELECT, INSERT, UPDATE, DELETE, TRUNCATE, TRIGGER
- Microsoft SQL Server: Unknown - if you can find out this information, please complete it.
執行安裝程式
進入“example.org/limesurvey/admin”。如果您正確設定了所有內容,LimeSurvey 安裝程式應該會啟動 - 只需按照說明進行操作即可。系統將詢問您是否希望建立資料庫和/或在資料庫內建立資料表。 LimeSurvey 將在資料庫中建立所需的資料表。
第一次執行管理者設定程式
上傳檔案後,您可以透過網站瀏覽器建立 LimeSurvey. 打開您的瀏覽器,在網址列鍵入 admin.php 的 url 網址. 如果您是使用limesurvey 作為目錄名稱來存放它的所有檔案, 網址大概的形式如是 "http://your.domain.com/limesurvey/admin/admin.php"
You should get a login screen. The default login credentials (if they have not been changed during the installation) are:
使用者:admin
密碼:password
緊記第一次登入後馬上要更改預設的密碼.
進一步的設定
快取
LimeSurvey 預設使用 Yii 做檔案快取,但可以配置為使用其他快取引擎。可能的其他快取有:
- Memcached
- Redis
- WinCache
- XCache
請參閱 Yii documentation 以了解完整說明。
Since LimeSurvey 4.0.0 you also have the possibility to cache calculations in the ExpressionScript. This can provide a significant speed-up depending on survey complexity. To enable the emcache, add this in your config.php file (components array):
'emcache' => array('class' => 'CFileCache'),
As with the main Yii cache, other cache systems can be used.

如果我遇到問題怎麼辦...
正如所有電腦程式, 運作過程難免偶有問題, 導致運作失常的原因也很多. 如果您操作上有麻煩, 請透過 limesurvey.org 的LimeSurvey forums 支援論壇或加入 IRC channel: irc://irc.freenode.net/limesurvey 發表您遇到的技術問題或LimeSurvey 執行後出現的錯誤訊息,一定有人協助您解決困難。