• Get In Touch
February 11, 2017

How to Install LimeSurvey on CentOS 7

Want your very own server? Get our 1GB memory, Xeon V4, 25GB SSD VPS for £10.00 / month.
Get a Cloud Server

LimeSurvey also known as PHPSurveyor is a free and open source online survey application written in PHP and based on Mysql, sqlite and postgreSQL. LimeSurvey allows you to develop and publish on-line surveys, collect responses, create statistics, and export the resulting data to other applications using web interface. you can create any number of survey using LimeSurvey and some of its features are listed below.

  • Provide user friendly web interface.
  • Supports unlimited number of participants to a survey.
  • Easily integrat pictures and movies into a survey
  • Easily create your own page layout using template editor.
  • You can create infinite number of surveys at the same time.

Prerequisites

  • A CentOS 7 Server
  • A root user

Updating the System

It is highly recommended to update your system and upgrade the available packages so please run the below shown command it’ll do the job for you.
yum -y update

Installing Apache Web Server

Once the system is updated, you can install the dependencies required. To install OrangeHRM you will need to install the Apache web server along with MaraiDB and PHP with a few extensions.

Run the following command to install the Apache web server.

yum -y install httpd

Now you can start Apache and enable it to start at boot time, using the following commands.

systemctl start httpd.service systemctl enable httpd.service

You can check the status of the Apache web server using the following command.

systemctl status httpd

You should see following output:

[root@Sajid ~]# systemctl status httpd
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
   Active: active (running) since Wed 2017-02-08 14:46:03 UTC; 22s ago
     Docs: man:httpd(8)
           man:apachectl(8)
 Main PID: 10743 (httpd)
   Status: "Total requests: 0; Current requests/sec: 0; Current traffic:   0 B/sec"
   CGroup: /system.slice/httpd.service
           ├─10743 /usr/sbin/httpd -DFOREGROUND
           ├─10744 /usr/sbin/httpd -DFOREGROUND
           ├─10745 /usr/sbin/httpd -DFOREGROUND
           ├─10746 /usr/sbin/httpd -DFOREGROUND
           ├─10747 /usr/sbin/httpd -DFOREGROUND
           └─10748 /usr/sbin/httpd -DFOREGROUND

Feb 08 14:46:03 ip-172-31-22-142 systemd[1]: Starting The Apache HTTP Server...
Feb 08 14:46:03 ip-172-31-22-142 systemd[1]: Started The Apache HTTP Server.


We will need to install MariaDB for database purposes for LimeSurvey. MariaDB 5.5 is shipped in the default CentOS 7 repository, so just run this command to install MariaDB.

yum -y install mariadb-server

Now you’ll have to start the MariaDB service and enable it to start at the boot time like we have done before for apache server, to do so please run following command.

systemctl start mariadb.service systemctl enable mariadb.service

You can check the status of mariaDB using this below given command and you should see following output.

systemctl status mariadb.service

[root@Sajid ~]# systemctl status mariadb.service
● mariadb.service - MariaDB database server
   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
   Active: active (running) since Wed 2017-02-08 14:47:40 UTC; 22s ago
 Main PID: 18035 (mysqld_safe)
   CGroup: /system.slice/mariadb.service
           ├─18035 /bin/sh /usr/bin/mysqld_safe --basedir=/usr
           └─18192 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --log-error=/var/log/ma...

Feb 08 14:47:38 ip-172-31-22-142 mariadb-prepare-db-dir[17956]: The latest information about MariaDB is available at http://mariadb.org/.
Feb 08 14:47:38 ip-172-31-22-142 mariadb-prepare-db-dir[17956]: You can find additional information about the MySQL part at:
Feb 08 14:47:38 ip-172-31-22-142 mariadb-prepare-db-dir[17956]: http://dev.mysql.com
Feb 08 14:47:38 ip-172-31-22-142 mariadb-prepare-db-dir[17956]: Support MariaDB development by buying support/new features from MariaDB
Feb 08 14:47:38 ip-172-31-22-142 mariadb-prepare-db-dir[17956]: Corporation Ab. You can contact us about this at sales@mariadb.com.
Feb 08 14:47:38 ip-172-31-22-142 mariadb-prepare-db-dir[17956]: Alternatively consider joining our community based development effort:
Feb 08 14:47:38 ip-172-31-22-142 mariadb-prepare-db-dir[17956]: http://mariadb.com/kb/en/contributing-to-the-mariadb-project/
Feb 08 14:47:39 ip-172-31-22-142 mysqld_safe[18035]: 170208 14:47:39 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'.
Feb 08 14:47:39 ip-172-31-22-142 mysqld_safe[18035]: 170208 14:47:39 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
Feb 08 14:47:40 ip-172-31-22-142 systemd[1]: Started MariaDB database server.


We recommend you make sure that this installation is secure and to do so run following command.

mysql_secure_installation

You’ll be asked to provide root password so enter appropriate password and answer yes to all questions by pressing Y.

Now you’ll have to create a database for LimeSurvey so please follow the instructions.

mysql -u root -p

You’ll be asked to enter password so simply enter a password and now execute the following queries to create a new database.

CREATE DATABASE limesurvey;

The above query will create a database named limesurvey. For the database you can use any name you prefer in the place of limesurvey. Make sure that you use semicolon at the end of each query as a query always ends with a semicolon. Once the database is created you can create a new user and grant the required permissions to the user for the database.

CREATE USER 'limesurvey_user'@'localhost' IDENTIFIED BY 'StrongPassword';

The above query will create a user with username limesurvey_user. You can use any preferred username instead of limesurvey_user. Replace StrongPassword with a strong password.

Now provide the appropriate privileges to your database user over the database you have created. Run the following query to do so.

GRANT ALL PRIVILEGES ON limesurvey.* TO 'limesurvey_user'@'localhost';

Now run the following query to immediately apply the changes on the database privileges.

FLUSH PRIVILEGES;

Now you can exit from MariaDB prompt using following command.

\q.

We will have to install PHP. To do so run following commands as shown below.

cd

If in case you don’t have wget package already installed on your system then you can install it using yum -y install wget.

wget https://centos7.iuscommunity.org/ius-release.rpm
yum -y install epel-release
rpm -Uvh ius-release.rpm

Now use this command to install PHP 5.6 and required extensions.

yum install php56u php56u-common php56u-xml php56u-gd php56u-mbstring php56u-mysqlnd php56u-mcrypt php56u-imap php56u-ldap -y

Next you’ll have to restart your apache web server to load new components that we just configured and use following command to restart apache web server.

systemctl restart httpd.service

Installing LimeSurvey

Once we have installed all the required dependencies then now we can download and install latest version of LimeSurvey and to download the latest version please run below give commands.
cd

wget https://www.limesurvey.org/stable-release?download=1994:limesurvey2622%20170203targz -O limesurvey2.62.2.tar.gz

We have downloaded the latest stable version of LimeSurvey so now we have to extract or unzip this archive file that we’ve just downloaded so run below given command it’ll do the job for you.

tar -zxvf limesurvey2.62.2.tar.gz

Next you’ll have to move all files to web root directory using this command.
mv limesurvey/ /var/www/html && sudo chown root:root -R /var/www/html

Next you’ll have to set proper ownership and run following command it’ll do the job for you.

chown -R apache:apache /var/www/html/limesurvey/tmp /var/www/html/limesurvey/upload /var/www/html/limesurvey/application/config

Next you’ll have to modify firewall rules and if in case you don’t have firewalld services installed on your server then you can install it using yum -y install firewalld and you can start it using systemctl start firewalld

Next run these below given command to modify the firewalld rules.

firewall-cmd --zone=public --permanent --add-service=http
firewall-cmd --reload

Now disable SELinux temporarily using this below given command.

setenforce 0

Web Aceess of LimeSurvey

Open your web browser and please visit http://yourserverIP/limesurvey to complete and finish the installation wizard when you’ll visit this web address you’ll see a web page like this.

HP_NO_IMG/data/uploads/users/744ed2f1-2baa-42b2-b09d-ad15a2ae3934/958915529.png” alt=” ” />

Please click on Start installation button available in right corner at the bottom and you’ll see a web page like this.

HP_NO_IMG/data/uploads/users/744ed2f1-2baa-42b2-b09d-ad15a2ae3934/1700118762.png” alt=”” />

Click on I accept button to agree to license terms.

HP_NO_IMG/data/uploads/users/744ed2f1-2baa-42b2-b09d-ad15a2ae3934/104792485.png” alt=” ” />

On the Pre-installation check page, confirm that all of your current settings meet LimeSurvey’s requirements, and then click the Next button.

HP_NO_IMG/data/uploads/users/744ed2f1-2baa-42b2-b09d-ad15a2ae3934/828266322.png” alt=” ” />

On the Database configuration page, input your database info, and then click the Next button.

HP_NO_IMG/data/uploads/users/744ed2f1-2baa-42b2-b09d-ad15a2ae3934/503552016.png” alt=” ” />

On the Database settings page, the wizard program will notify you that the database named limesurvey already exists. Click the Populate database button to fill in data and move on.

HP_NO_IMG/data/uploads/users/744ed2f1-2baa-42b2-b09d-ad15a2ae3934/1458314544.png” alt=” ” />

On the Optional settings page, input info which is necessary for managing LimeSurvey. For security purposes, you should NOT use the default admin login name admin and the default masked password password. Instead, pick a lesser-known admin login name and a strong password and click on next button.

Next on the success page you’ll see admin username name and password then click on Administration button and you’ll be redirected to login page so login with your username and password and finally click on login button.

HP_NO_IMG/data/uploads/users/744ed2f1-2baa-42b2-b09d-ad15a2ae3934/1550536049.png” alt=” ” />

Conclusion

In this tutorial you’ve how to install LimeSurvey on your CentOS 7 server. Now you can easily create a new survey using LimeSurvey web interface.

Want your very own server? Get our 1GB memory, Xeon V4, 25GB SSD VPS for £10.00 / month.
Get a Cloud Server

Share this Article!

Related Posts

Node.js Authentication – A Complete Guide with Passport and JWT

Node.js Authentication – A Complete Guide with Passport and JWT

Truth be told, it’s difficult for a web application that doesn’t have some kind of identification, even if you don’t see it as a security measure in and of itself. The Internet is a kind of lawless land, and even on free services like Google’s, authentication ensures that abuses will be avoided or at least […]

Node.js and MongoDB: How to Connect MongoDB With Node

Node.js and MongoDB: How to Connect MongoDB With Node

MongoDB is a document-oriented NoSQL database, which was born in 2007 in California as a service to be used within a larger project, but which soon became an independent and open-source product. It stores documents in JSON, a format based on JavaScript and simpler than XML, but still with good expressiveness. It is the dominant […]

Using MySQL with Node.js: A Complete Tutorial

Using MySQL with Node.js: A Complete Tutorial

Although data persistence is almost always a fundamental element of applications, Node.js has no native integration with databases. Everything is delegated to third-party libraries to be included manually, in addition to the standard APIs. Although MongoDB and other non-relational databases are the most common choice with Node because if you need to scale an application, […]

Node.Js Vs Django: Which Is the Best for Your Project

Node.Js Vs Django: Which Is the Best for Your Project

Django and NodeJs are two powerful technologies for web development, both have great functionality, versatile applications, and a great user interface. Both are open source and can be used for free. But which one fits your project best? NodeJs is based on JavaScript, while Django is written in Python. These are two equally popular technologies […]

Nodejs Vs PHP:  Which Works Best?

Nodejs Vs PHP: Which Works Best?

Before getting into the “battle” between Node.js and PHP we need to understand why the issue is still ongoing. It all started with the increased demand for smartphone applications, their success forcing developers to adapt to new back-end technologies that could handle a multitude of simultaneous requests. JavaScript has always been identified as a client-side […]