Actions

Installation - LimeSurvey CE/zh-cn: Difference between revisions

From LimeSurvey Manual

(Updating to match new version of source page)
(Updating to match new version of source page)
(45 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<languages />
<languages />


<div style="float:right;"><div class="simplebox">Additional pages:{toc}</div></div> {maketoc title="On this page:"}
<div class="simplebox"> 注意: 此安装指南适用于版本2.0及其后的版本。1.92版的安装指南在[[Installation Version 1.92 or older|这里]] 升级指南在[[Upgrading from a previous version|这里]] </div>


=General=
<div class="simplebox"> Note: These installation instructions are for version 2.0 or later. Older instructions for 1.92 can be found [[Installation Version 1.92 or older|here]] and update instructions can be found [[Upgrading from a previous version|here]]. </div>


The LimeSurvey project offers two ways of installating LimeSurvey:
=基本情况=
*On your webserver:<br />In that case just follow the instructions on this page starting with step 1.


*On your local Windows PC:<br />You usually only want to install LimeSurvey on your local PC if you want to create surveys locally (mainly for speed or test reasons) and upload them later to your live LimeSurvey installation on a web server. For this we have prepared a special package for LimeSurvey which includes the web server, the database and the LimeSurvey application and [[Installation of the LimeSurvey XAMPP package|instructions how to install it]].
LimeSurvey  项目提供了 2 种安装方法:
*在你的 Web 服务器上安装:<br />如果你是在你的 Web 服务器上安装 LimeSurvey, 你可以按照下面的步骤直接进行安装就可以了。


=1. 确定 LimeSurvey 能够在你的网站使用=
*在你的本地 Window 电脑上安装:<br />如果你希望在你的本地创建文件调查,你可能希望在你的本地计算机上安装。有时候你也可能希望能够在本地进行软件测试和提高网站的访问效率而将 LimeSurvey 装在你的本地计算机上,让后将本地的安装实例上传到服务器上。
针对这个情况,你需要为你的本地安装实例准备一些特定的软件包,LimeSurvey 需要这些软件才能运行。这些软件包括 Web 应用服务器,数据库服务器和 LimeSurvey 应用程序等。请参考[[Installation of the LimeSurvey XAMPP package|如何安装这些软件的指南]]。


确定服务器符合以下要求:
=确定 LimeSurvey 能够在你的网站使用=


必须:
请确定你的服务器满足下面的最低要求。
* 约 40 兆的磁盘空间保存脚本
按照要求将会在程序安装的时候进行检查。
* MySQL 4.1.0 或以上版本 '''OR'''    Microsoft SQL Server 2000 或以上版本 '''OR'''  Postgres 8.1 或以上版本
* PHP 5.x 或以上版本并启用下列模块/链接库:
** mbstring (Multibyte String Functions) 扩展库 (参见[http://docs.limesurvey.org/tiki-index.php?page=Installation+FAQ#What_is_this_mbstring_Multibyte_String_Functions_library_ Installation FAQ])
** mysql4 或 mysql5 PHP 链接库(主机商标准 - 如果你想设立自己的服务器请确保它被安装)
** sessions - 见 http://de2.php.net/manual/en/session.installation.php (也是标配)
** pcre (regular expressions) - 见 http://de2.php.net/manual/en/book.pcre.php (也是标配)


<div class="simplebox"> Please note that LimeSurvey 2.x uses different database drivers than 1.x . If you get a message not No DBO driver was found during the installation you will have to contact your webspace provider and ask them to activate one of the aforementioned database driver libraries. </div>
{{Note|The minimum set of requirements will also be checked during the installation process!}}


<div class="mw-translate-fuzzy">
安装必须满足的最低要求:
* 约 180(MB) 兆的磁盘空间。
* MySQL 5.5.3 或以上版本 '''OR'''    Microsoft SQL Server 2005 或以上版本 '''OR'''  Postgres 9 或以上版本
* PHP 5.3.3 或以上版本, 但是推荐使用 PHP 5.5.x 或以上版本,并启用下列模块/链接库:
** mbstring (Multibyte String Functions) 扩展库 (参见[[Installation FAQ#What is this mbstring (Multibyte String Functions) library?|安装FAQ]] )
** 供MySQL使用的PDO数据库引擎(pdo_mysql 或 pdo_mysqli) 或 Postgres (pdo_pgsql) 或MSSQL (Windows使用[http://php.net/manual/en/ref.pdo-sqlsrv.php pdo_sqlsrv] 和Linux使用[http://www.php.net/manual/en/ref.pdo-dblib.php pdo_dblib])
** 启用所有PHP的预设函数库(比如 hash, session, 等等)。
</div>


可选:
<div class="simplebox">注意:如果你用 dblib PDO引擎从Linux连接在Windows服务器上的MSSQL数据库, 那么下层的FreeTDS需要设置正确. 阅读[[Troubleshooting|故障修理]]获得更多信息。</div>
* 已安裝iconv 扩展库(only for PHP 4 versions - needed for Excel export)
 
* GD-Library '''with FreeType support''' installed (for captchas or nice charts in statistics) 见[http://de3.php.net/manual/en/ref.image.php GD-Library PHP Documentation]
<div class="mw-translate-fuzzy">
* 已安裝LDAP-Library (to import tokens using LDAP) 见 [http://de.php.net/manual/en/ldap.installation.php PHP LDAP Documentation]
可选PHP扩展库:
* 需要安装'''GD-Library''' '''with FreeType support'''以使用验证码和数据分析中美化的图表-阅读 [http://php.net/manual/image.setup.php PHP GD-Library Extension documentation]
* 需要'''IMAP''' (相当常用)以使用[[Email bounce tracking system|邮件退回跟踪系统]] - 阅读 [http://php.net/manual/imap.setup.php PHP IMAP Extension documentation]
* 需要安装'''LDAP'''用来从LDAP导入令牌 - 阅读 [http://de.php.net/manual/en/ldap.installation.php PHP LDAP Documentation]
* 需要'''Zip''' (相当常用)用于上传模版和导入资源Zip压缩文件 - 阅读 [http://php.net/manual/zip.setup.php PHP Zip Extension documentation]
* 需要'''Zlib''' (相当常用)以使用[[ComfortUpdate]] - 阅读 [http://php.net/manual/zlib.setup.php PHP Zlib Extension documentation]
</div>


多数情况下网站空间商或系统管理员可以代劳。
多数情况下网站空间商或系统管理员可以代劳。


如果你想在本机使用LimeSurvey,我们推荐[http://www.apachefriends.org/en/xampp.html XAMPP],它很容易安装配置包含 Apache, MySQL, PHP 和Perl在内的服务器。 LimeSurvey无需配置即可运行在XAMPP上。
<div class="mw-translate-fuzzy">
如果你想使用Microsoft的IIS服务器,阅读"[[Installation on XP with IIS|如何在XP上安装IIS]]可能有帮助。
</div>


If you want to run Microsoft's IIS server take a look at "[[Installation of LimeSurvey on a Windows XP machine]]" and "[[Installation on XP with IIS]]".
<div class="mw-translate-fuzzy">
===兼容浏览器===
进行调查问卷的一端支持的浏览器包括IE9及以上,FireFox, Chrome, Opera, 等等(需启用JavaScript)。
系统管理的一端支持的浏览器包括IE11及以上,FireFox, Chrome, Opera, 等等(需启用JavaScript)。
不支持任何内网模式或兼容模式的IE版本!
</div>


==1.1 LimeSurvey主机==
'''For the administration part''', we currently support Edge and all newer comparable browsers like FF, Chrome, Opera etc. with activated JavaScript. <u>We do not support any Internet Explorer versions in the administration part anymore.</u>


LimeSurvey should work with most hosting companies which provide PHP and MYSQL. If you want a ready-installed version of LimeSurvey consider using [http://www.limeservice.com LimeService], else check out our [[LimeSurvey-compatible hosting companies|list of LimeSurvey-compatible hosting companies]].
==屏幕大小==
我们支持所有做调查问卷合理的屏幕大小(360像素x640像素及以上)。
管理LimeSurvey所需要的最低屏幕解析度是1280像素 x 1024像素。


=2. 下载LimeSurvey软件包=
==LimeSurvey网络主机==


[http://www.limesurvey.org/index.php/Download.html 下载] 最新的稳定的LimeSurvey的zip格式压缩包 (也有gzip, bz2 和 7zip 格式压缩包) 并保存到你的本地磁盘。
LimeSurvey 可运行在多数提供PHP和MYSQL的网络主机服务商上。如果你需要一个以安装版本的LimeSurvey请考虑使用[https://www.limesurvey.org/component/limeservice/?view=limeservice&task=limeservice.routeAlternatives LimeSurvey Professsional], 否则也可检视我们的 [[LimeSurvey-compatible hosting companies|LimeSurvey-兼容主机商列表]].


=3. 解压LimeSurvey 软件包=
=下载LimeSurvey软件包=
 
[https://www.limesurvey.org/en/downloads/category/25-latest-stable-release 下载] 最新的稳定的LimeSurvey的zip格式压缩包 (也有gzip, bz2 和 7zip 格式压缩包) 并保存到你的本地磁盘。
 
=解压LimeSurvey 软件包=


采用你喜好的压缩软件解压 zip 格式的软件包至专用目录/文件夹。请一并解压软件包原来默认的目录结构及相关档案。安装路径不应包含字符,但可以包含空格符。The path name for the installation directory should not include '''(''' or ''')''' characters, but may include the '''space''' character
采用你喜好的压缩软件解压 zip 格式的软件包至专用目录/文件夹。请一并解压软件包原来默认的目录结构及相关档案。安装路径不应包含字符,但可以包含空格符。The path name for the installation directory should not include '''(''' or ''')''' characters, but may include the '''space''' character
Line 65: Line 88:
现在用你喜好的文本编辑器打开位于''/limesurvey/'' 根目录的文件''config.php'' 。
现在用你喜好的文本编辑器打开位于''/limesurvey/'' 根目录的文件''config.php'' 。


=7.1 Set Directory permissions=
=Set directory permissions=


For the script to work properly it needs certain access to some directories - this applies especially to Linux/*nix systems.
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/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/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 '''"/limesurvey/application/config/"''' directory also needs ''Read & Write'' permissions for your webserver.
*The other directories can be set to ''Read Only'' or in Linux/Unix. You may wish to set the permissions on each file within the /limesurvey/admin directory to ''Read Only''.
*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''.


<!--div class="simplebox">[[File:help.png]] '''Hint:''' If you are using Linux then depending on your webserver configuration you will have to chmod the rights on the writable folders to 755 or 777. Try 755 first - if it does not work 'upgrade' to 777.</div-->
{{Alert|If you are using Linux, then setting permissions depends on your webserver configuration. For example, if you use Apache HTTPD on CentOS, type '''chmod -R 755 <directory> ; chown -R apache <directory>'''. This will give everyone access to read, and your webserver will have the permission to write. Check the [https://www.linux.com/learn/tutorials/309527-understanding-linux-file-permissions following link] for more information on Linux permissions.}}
{{Hint|Text=If you are using Linux then depending on your webserver configuration you will have to chmod the rights on the writable folders to 755 or 777. Try 755 first - if it does not work 'upgrade' to 777.}}


=7.2 Create a database user=
=Create a database user=


LimeSurvey will create a database and the tables inside it. To be able to do this it will need the username and password of a database user. In general we recommend to create a database user with the following permissions:
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
- MySQL: SELECT, CREATE, INSERT, UPDATE, DELETE, ALTER, DROP, INDEX
Line 84: Line 106:
- PostgreSQL: SELECT, INSERT, UPDATE, DELETE, TRUNCATE, TRIGGER
- PostgreSQL: SELECT, INSERT, UPDATE, DELETE, TRUNCATE, TRIGGER


- Microsoft SQL Server:
- Microsoft SQL Server: ''Unknown - if you can find out this information, please complete it''.


=8. 运行安装脚本=
=8. 运行安装脚本=


<div class="mw-translate-fuzzy">
'''转至"http://your.domain.com/limesurvey/admin/install"'''. 如果配置都正确,系统将要求你创建数据库及其数据表。LimeSurvey 接着就会创建相关库表。当脚本提示你已经成功创建相关数据表时,你将被提示 '''更名或删除''/admin/install''目录''' - 就请照做吧(:biggrin:)。
'''转至"http://your.domain.com/limesurvey/admin/install"'''. 如果配置都正确,系统将要求你创建数据库及其数据表。LimeSurvey 接着就会创建相关库表。当脚本提示你已经成功创建相关数据表时,你将被提示 '''更名或删除''/admin/install''目录''' - 就请照做吧(:biggrin:)。
</div>


=9. 首次连接管理脚本=
=9. 首次连接管理脚本=
Line 98: Line 122:
<div class="simplebox"> User: admin
<div class="simplebox"> User: admin


User: admin
Password: password
Password: password


</div>
</syntaxhighlight>


在你登录后会被提示修改默认密码。玩得开心!
在你登录后会被提示修改默认密码。玩得开心!
=Further configuration=
==Caching==
LimeSurvey uses the Yii file cache by default, but it can be configured to use other cache engines. Possible other caches are:
* Memcached
* Redis
* WinCache
* XCache
Please see the [https://www.yiiframework.com/doc/api/1.1/CCache Yii documentation] for full description.
Since LimeSurvey 4.0.0 you also have the possibility to cache calculations in the Expression Manager. This can provide a significant speed-up depending on survey complexity. To enable the emcache, add this in your config.php file (components array):
<syntaxhighlight lang="php">
'emcache' => array('class' => 'CFileCache'),
</syntaxhighlight>
As with the main Yii cache, other cache systems can be used.
{{Note| The emcache is not compatible with randomized surveys, and will be automatically turned off in such cases.}}


=10. 如果我有问题...=
=10. 如果我有问题...=

Revision as of 20:20, 12 June 2019

注意: 此安装指南适用于版本2.0及其后的版本。1.92版的安装指南在这里 升级指南在这里
Note: These installation instructions are for version 2.0 or later. Older instructions for 1.92 can be found here and update instructions can be found here.

基本情况

LimeSurvey 项目提供了 2 种安装方法:

  • 在你的 Web 服务器上安装:
    如果你是在你的 Web 服务器上安装 LimeSurvey, 你可以按照下面的步骤直接进行安装就可以了。
  • 在你的本地 Window 电脑上安装:
    如果你希望在你的本地创建文件调查,你可能希望在你的本地计算机上安装。有时候你也可能希望能够在本地进行软件测试和提高网站的访问效率而将 LimeSurvey 装在你的本地计算机上,让后将本地的安装实例上传到服务器上。

针对这个情况,你需要为你的本地安装实例准备一些特定的软件包,LimeSurvey 需要这些软件才能运行。这些软件包括 Web 应用服务器,数据库服务器和 LimeSurvey 应用程序等。请参考如何安装这些软件的指南

确定 LimeSurvey 能够在你的网站使用

请确定你的服务器满足下面的最低要求。 按照要求将会在程序安装的时候进行检查。

The minimum set of requirements will also be checked during the installation process!

安装必须满足的最低要求:

  • 约 180(MB) 兆的磁盘空间。
  • MySQL 5.5.3 或以上版本 OR Microsoft SQL Server 2005 或以上版本 OR Postgres 9 或以上版本
  • PHP 5.3.3 或以上版本, 但是推荐使用 PHP 5.5.x 或以上版本,并启用下列模块/链接库:
    • mbstring (Multibyte String Functions) 扩展库 (参见安装FAQ )
    • 供MySQL使用的PDO数据库引擎(pdo_mysql 或 pdo_mysqli) 或 Postgres (pdo_pgsql) 或MSSQL (Windows使用pdo_sqlsrv 和Linux使用pdo_dblib)
    • 启用所有PHP的预设函数库(比如 hash, session, 等等)。
注意:如果你用 dblib PDO引擎从Linux连接在Windows服务器上的MSSQL数据库, 那么下层的FreeTDS需要设置正确. 阅读故障修理获得更多信息。

可选PHP扩展库:

多数情况下网站空间商或系统管理员可以代劳。

如果你想使用Microsoft的IIS服务器,阅读"如何在XP上安装IIS可能有帮助。

兼容浏览器

进行调查问卷的一端支持的浏览器包括IE9及以上,FireFox, Chrome, Opera, 等等(需启用JavaScript)。 系统管理的一端支持的浏览器包括IE11及以上,FireFox, Chrome, Opera, 等等(需启用JavaScript)。 不支持任何内网模式或兼容模式的IE版本!

For the administration part, we currently support Edge and all newer comparable browsers like FF, Chrome, Opera etc. with activated JavaScript. We do not support any Internet Explorer versions in the administration part anymore.

屏幕大小

我们支持所有做调查问卷合理的屏幕大小(360像素x640像素及以上)。 管理LimeSurvey所需要的最低屏幕解析度是1280像素 x 1024像素。

LimeSurvey网络主机

LimeSurvey 可运行在多数提供PHP和MYSQL的网络主机服务商上。如果你需要一个以安装版本的LimeSurvey请考虑使用LimeSurvey Professsional, 否则也可检视我们的 LimeSurvey-兼容主机商列表.

下载LimeSurvey软件包

下载 最新的稳定的LimeSurvey的zip格式压缩包 (也有gzip, bz2 和 7zip 格式压缩包) 并保存到你的本地磁盘。

解压LimeSurvey 软件包

采用你喜好的压缩软件解压 zip 格式的软件包至专用目录/文件夹。请一并解压软件包原来默认的目录结构及相关档案。安装路径不应包含字符,但可以包含空格符。The path name for the installation directory should not include ( or ) characters, but may include the space character

4. 收集服务器信息

你需要明白以下条件才能在网站服务器上正确安装 LimeSurvey:

  • 你意图脚本驻留的网址(比如: http://my.domain.com/limesurvey)
  • 脚本驻留在服务器上的物理磁盘位置 (如: /home/usr/htdocs/limesurvey)
  • MySQL 数据库的 IP/网络位置(如: localhost)
  • 如果MySQL 数据库使用非标准端口, 就要找出端口号。
  • MySQL 数据库使用的用户名及密码
  • 多数供应商不支持脚本来创建数据库,你必须手动创建。如果你使用了这样的供应商,请自行创建数据库(例如 limesurvey)。
Hint: 某些供应商在你创建数据库时,会以你的用户名做前缀。例如你的主机供应商给你用户名是 mike, 当你创建数据库 lime、实际的数据库名会是 mike_lime.

5. 配置 LimeSurvey

现在用你喜好的文本编辑器打开位于/limesurvey/ 根目录的文件config.php

Set directory permissions

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.
  If you are using Linux, then setting permissions depends on your webserver configuration. For example, if you use Apache HTTPD on CentOS, type chmod -R 755 <directory> ; chown -R apache <directory>. This will give everyone access to read, and your webserver will have the permission to write. Check the following link for more information on Linux permissions.


Create a database user

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.

8. 运行安装脚本

转至"http://your.domain.com/limesurvey/admin/install". 如果配置都正确,系统将要求你创建数据库及其数据表。LimeSurvey 接着就会创建相关库表。当脚本提示你已经成功创建相关数据表时,你将被提示 更名或删除/admin/install目录 - 就请照做吧(:biggrin:)。

9. 首次连接管理脚本

一切就绪!打开浏览器并键入admin.php脚本所在的网址。假定你使用了LimeSurvey作为目录名称存放文件,网址就会类似"http://your.domain.com/limesurvey/admin/admin.php"。

你应当看到一个登录屏幕。默认的登录项是

User: admin

User: admin Password: password

</syntaxhighlight>

在你登录后会被提示修改默认密码。玩得开心!

Further configuration

Caching

LimeSurvey uses the Yii file cache by default, but it can be configured to use other cache engines. Possible other caches are:

  • Memcached
  • Redis
  • WinCache
  • XCache

Please see the Yii documentation for full description.

Since LimeSurvey 4.0.0 you also have the possibility to cache calculations in the Expression Manager. 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.

The emcache is not compatible with randomized surveys, and will be automatically turned off in such cases.

10. 如果我有问题...

就像所有的计算机程序一样,多数情况下它们会按照设计的那样工作,但有时难免出错。至于原因多种多样。如果你遇到了问题,首先请参阅Installation FAQ。如果无法找到答案,请在论坛发布你的问题和错误代码,或加入IRC channel: