Over a million developers have joined DZone.

How to Install and Configure LimeSurvey on a Linux Machine

DZone 's Guide to

How to Install and Configure LimeSurvey on a Linux Machine

· Web Dev Zone ·
Free Resource
LimeSurvey or formerly known as PHPSurveyor is a PHP based, open source application based on a MySQL or PostgreSQL. Designed to be user-friendly, it enables users to easily create, develop and publish unlimited number surveys and collect responses for them, without doing any coding and scripting.

To run LimeSurvey on your Linux VPS, MySQL 4.1.0 or later (PostgreSQL 8.1 or later) and PHP 5.1.2 or later, are required.

First you should download the LimeSurve zip package (also gzip, bz2 and 7zip packages are available). Go to LimeSurvey's official website and download the latest stable release from http://www.limesurvey.org/en/stable-release

Unpack the LimeSurvey package in the document root directory of your website where you want to install LimeSurvey:

# unzip /path/to/limesurvey192plus-build120623.zip -d 

This will create a 'limesurvey' directory in '/var/www/html/yourwebsite.com'

Change to the newly created 'limesurvey' directory:

# cd /var/www/html/yourwebsite.com/limesurvey

Now, we will need to create a new MySQL database that you will be using for LimeSurvey and user for the database.
Login to your MySQL server as root user and enter your password:

# mysql -u root -p

Enter password:

Create a new MySQL database called 'limesurvey' (you can use any name you want):

# create database limesurvey;

While still logged in as root user, create a new MySQL user called 'limesurvey_user' (any name can be used):

# GRANT ALL ON limesurvey.* TO limesurvey_user@localhost IDENTIFIED BY 'yourpassword';

Please use a strong password. This is just an example.



Log out from your MySQL server:

# exit;

Using your favorite text editor open the configuration file of LimeSurvey (config.php) and edit the following information for your MySQL database:

$databasetype  =  'mysql';

$databaselocation  =  'localhost';

$databasename  =  'limesurvey';

$databaseuser  =  'limesurvey_user';

$databasepass  =  'yourpassword';

$dbprefix  =  'lime_';

After finish editing, do not forget to save the changes.

Change the correct permissions for the script to work properly:

x# chmod -R 770 tmp/

# chmod -R 770 upload/

To complete the installation of LimeSurvey, go to http://yourwebsite.com/limesurvey/admin/install, login with the default login credentials (username: admin ; password: password) and follow the given instructions. You will be prompted to change the default password after you logged in.

After everything is done, you will need to remove or rename the LimeSurvey installation directory on your server since it may be a security risk:

# rm -rf admin/install

Author Bio:
Joy Mali is a certified digital analyst who helps online businesses to perform better on the web with best solutions & advice. Her content is featured on many mainstream sites & blogs. You can follow her on  Google Plus.

linux vps ,limesurvey ,phpsurveyor

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}