How to Set up LimeSurvey (CE) on CentOS 7

LimeSurvey is an free study application published in PHP. LimeSurvey resource rule is organised on GitHub. In this guide, we will take you step-by-step through the LimeSurvey Community Version (CE) set up procedure on a clean CentOS 7 program.

Requirements

In to set up LimeSurvey (CE) on your CentOS 7 program, make sure your program satisfies the following requirements:

  • Minimum 250 MB hard drive area.
  • MySQL 5.5.3 or later or MariaDB 5.5 or later. This guide will use MariaDB.
  • PHP 5.5.9 or later (PHP 7.0.0+ is recommended) with the following extensions: Mbstring, PDO data resource car owner for MySQL or PostgreSQL, GD-Library, IMAP, LDAP, ZIP.
  • Apache 2.4 or later or Nginx 1.1 or later. This guide will use Nginx.

Initial steps

Check your CentOS program version:

cat /etc/centos-release
# CentOS Linux system launch 7.5.1804 (Core)

Set up the timezone:

timedatectl list-timezones
sudo timedatectl set-timezone 'Region/City'

Update your working system’s packages:

sudo yum upgrade -y

Install vim, git, unzip, and socat packages:

sudo yum set up -y vim git unzip socat

Step 1 – Install PHP

LimeSurvey needs PHP edition 5.5.9 or higher, while PHP 7.0.0+ is the suggested edition. Standard CentOS databases contain mature edition of PHP, and thus we will need to set up a third-party database to use a more recent PHP edition. We will use Webtatic database.

Setup the Webtatic YUM repo:

sudo rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

Install PHP, as well as the necessary PHP extensions:

sudo yum set up -y php72w php72w-cli php72w-fpm php72w-common php72w-mbstring php72w-xml php72w-mysql php72w-gd php72w-zip php72w-ldap php72w-imap

Check the PHP version:

php --version

# PHP 7.2.12 (cli) (built: Nov 11 2018 14:54:16) ( NTS )
# Trademark (c) 1997-2018 The PHP Group
# Zend Motor v3.2.0, Trademark (c) 1998-2018 Zend Technologies

Start and allow PHP-FPM service:

sudo systemctl begin php-fpm.service
sudo systemctl allow php-fpm.service

Step 2 – Install MariaDB and build a data resource for LimeSurvey

Install MariaDB data resource server:

sudo yum set up -y mariadb-server

Check the MariaDB version:

mysql --version
# mysql Ver 15.1 Distrib 5.5.60-MariaDB, for Linux system (x86_64) using readline 5.1

Start and allow MariaDB service:

sudo systemctl begin mariadb.service
sudo systemctl allow mariadb.service

Run mysql_secure installation script to enhance MariaDB protection and set the protection password for MariaDB root user:

sudo mysql_secure_installation

Answer the concerns as proven below:

Enter present protection password for main (enter for none):
Set main password? [Y/n]: Y
Remove unknown users? [Y/n]: Y
Disallow main sign in remotely? [Y/n]: Y
Remove analyze data resource and accessibility to it? [Y/n]: Y
Reload benefit platforms now? [Y/n]: Y

Log into MariaDB spend as the customer root:

mysql -u main -p
# Get into password

Create a MariaDB data resource and customer that you will use for your set up of LimeSurvey, don’t forget the credentials:

CREATE DATABASE dbname;
GRANT ALL ON dbname.* TO 'username' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;

Exit from MariaDB shell:

quit

Step 3 – Install and set up Nginx

Install Nginx webserver:

sudo yum set up -y nginx

Check the NGINX version:

nginx -v
# nginx version: nginx/1.12.2

Start and allow Nginx service:

sudo systemctl begin nginx.service
sudo systemctl allow nginx.service

Run sudo vim /etc/nginx/conf.d/limesurvey.conf and fill the computer file with the following configuration:

server {
 pay attention 80;

 server_name example.com;
 main /var/www/limesurvey;

 catalog index.php;

 place / {
 try_files $uri $uri/ /index.php?$args;
 }
 
 place ~ .php$ {
 try_files $uri =404;
 consist of fastcgi_params;
 fastcgi_pass 127.0.0.1:9000;
 fastcgi_index catalog.php;
 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
 }

}

Test the NGINX configurations.

sudo nginx -t

Reload NGINX.

sudo systemctl refill nginx.service

Step 4 – Obtain and set up LimeSuervey

Create a papers main directory:

sudo mkdir -p /var/www/limesurvey

Change possession of the /var/www/limesurvey directory to johndoe:

sudo chown -R [your_user]:[your_user] /var/www/limesurvey

Navigate to papers root:

cd /var/www/limesurvey

Download the LimeSurvey ZIP installer:

wget https://www.limesurvey.org/stable-release?download=2514:limesurvey3155%20181115zip -O limesurvey.zip

Unzip LimeSurvey installer:

unzip limesurvey.zip
rm limesurvey.zip
mv limesurvey/* . && mv limesurvey/.* .
rmdir limesurvey

Change possession of the /var/www/limesurvey directory to nginx:

sudo chown -R nginx:nginx /var/www/limesurvey

Create the directory/var/lib/php/session and set possession to nginx.

sudo mkdir -p /var/lib/php/session && sudo chown -R nginx:nginx /var/lib/php

Run sudo vim /etc/php-fpm.d/www.conf and set the customer and team to nginx. Originally, they will be set to apache:

sudo vim /etc/php-fpm.d/www.conf
# customer = nginx
# team = nginx

Restart the PHP-FPM service:

sudo systemctl reboot php-fpm.service

Step 5 – Finish the LimeSurvey setup

Open your internet web browser and kind the URL http://example.com. You will be rerouted to the following page:

LimeSurvey Installer

Select your recommended terminology and click on the Start Installation button. AfterThe LimeSurvey certificate web page should appear.

Accept the license

Check and simply choose the I accept key if you believe the certificate conditions. After this phase, you should see the LimeSurvey pre-installation examine page:

pre-installation check

Make sure all the needs are finished, then simply just click the Next button. This should assist you to the data resource configurations web page.

Database configuration

Enter the data resource configurations you want to use for LimeSurvey and simply choose the Next key. You should see the following page:

Database settings

Click on the Populate database button. You should see the following page:

Administration settings

Here, offer your administration information, website name, present e-mail deal with, then simply just click the Next button. Once the set up has been finished, you should see the following page:

LimeSurvey set up successfully

Now, simply just click the Administration button. You should see the following page:

Log-in

Provide your sign in information, then simply just click the Log In button. You should see the LimeSurvey management interface:

Lime Survey Dashboard

Links

Post Author: Hack3rN3ws

Leave a Reply

Your email address will not be published. Required fields are marked *