LimeSurvey provides you with instant feedback from your users. When compared to services that sell survey services, hosting your own VPS to conduct online surveys could potentially save you some money. LimeSurvey is the leading free online survey app. In this article we will learn how to install LimeSurvey on an Ubuntu 16.04 VPS.
Before starting the installation of LimeSurvey, we must ensure that our VPS meets some basic requirements. Most of these requirements will also be checked during the installation; Just for reference, here is a full list:
– Minimum 180MB disk space
– MySQL 5.5.3
– A web server (Apache or nginx)
– Minimum PHP 5.3.3 or later, however “PHP 5.5.x” is recommend
– The following PHP modules/libraries enabled: mbstring, PDO for MySQL (pdo_mysql or pdo_mysqli), PHP curl
– The following PHP Extensions are optional: PHP GD-Library, PHP IMAP, PHP LDAP, PHP Zlib
From an end user standpoint, LimeSurvey supports popular modern web browsers. In addition, LimeSurvey can automatically render on mobile devices. This is espicially helpful if you create mobile apps and you wish to use your VPS to host surveys that are available for end users through app itself.
Installing LimeSurvey on your VPS
Now that we have cleared all the requirements of LimeSurvey, it is time to start with the installation. First we will need to connect to our VPS via SSH. Once we are logged in, we will need to gain root access using the following command:
> sudo -i
You will be asked for the password. Type it in and you will be ready to start!
The next step is to download the latest stable LimeSurvey zip package (from this page) and save it to the local disk of the VPS. Before we do this, let’s first enter the default web folder:
> cd /var/www/html
Now use the following command to begin the download.
> wget https://www.limesurvey.org/stable-release?download=1898:limesurvey255%20161021targz
If this link doesn’t work, simply go to the latest stable release page at LimeSurvey and right click on the “Download” button for the tar.gz file. You’ll select Copy Link Address and use this URL in your wget command.
Uncompress the file into a dedicated directory using the following command:
> tar xzf filename.tar.gz
You’ll want to pay attention to the file name at the end of the URL; you’ll need to explicitly call this filename when you go to uncompress the LimeSurvey tar.gz file.
For the script to work properly, we need to change some permissions around on the server.
The "/limesurvey/tmp" directory and all its subdirectories are used for imports & uploads. This location will require Read/Write permissions to be configured on your webserver.
The "/limesurvey/upload/" directory and all its subdirectories 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 to set the permissions on each file within the /limesurvey/admin directory to Read Only. In order to do this execute the following commands:
> chmod –R 755 limesurvey/ > chmod –R 555 limesurvey/admin > chown -R www-data:www-data limesurvey
Create a MySQL Database for LimeSurvey
Now we will need to create a database and a database user. LimeSurvey will create the tables inside it. Let’s begin configuring the username and password of the database user.
In general it is recommend to create a database user with the following permissions: SELECT, CREATE, INSERT, UPDATE, DELETE, ALTER, DROP, INDEX. In order to do so, execute the following command:
> mysql –u root -p > CREATE DATABASE limesurvey; > GRANT ALL PRIVILEGES ON limesurvey.* To 'limesurvey'@'localhost' IDENTIFIED BY 'l1m3surv3y'; > FLUSH PRIVILEGES;
We are now ready to run the installation process. Go to “http://your-IP/limesurvey/admin” and press the “Start Installation” button.
Accept the Terms and Conditions of the license. The next page checks that you are meeting all the requirements to run LimeSurvey on your VPS. If you are missing any of the modules, you can easily install them using the following commands:
> apt-get install php5-imap php5-gd php5-ldap php5-curl pdo-mysql
> /etc/ini.d/apache2 restart
You will be asked for the user and password for the database you just created. LimeSurvey then creates the needed tables in the database.
Get Logged Into the LimeSurvey App
On the last page, you will be asked for your Administrator login information. You can leave the default and change everything later, but it is recommend that you change the password to something secure.
After the installer has finished, LimeSurvey will up and running. Open your browser and enter the following URL:
You’ll be greeted by the LimeSurvey Admin login screen. The default login credentials (if not changed during in the installation) are
Enjoy creating surveys for your end users that will help you gain valuable feedback on your products and services.