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.
- 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: Starting The Apache HTTP Server... Feb 08 14:46:03 ip-172-31-22-142 systemd: 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: 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: You can find additional information about the MySQL part at: Feb 08 14:47:38 ip-172-31-22-142 mariadb-prepare-db-dir: http://dev.mysql.com Feb 08 14:47:38 ip-172-31-22-142 mariadb-prepare-db-dir: Support MariaDB development by buying support/new features from MariaDB Feb 08 14:47:38 ip-172-31-22-142 mariadb-prepare-db-dir: Corporation Ab. You can contact us about this at firstname.lastname@example.org. Feb 08 14:47:38 ip-172-31-22-142 mariadb-prepare-db-dir: Alternatively consider joining our community based development effort: Feb 08 14:47:38 ip-172-31-22-142 mariadb-prepare-db-dir: http://mariadb.com/kb/en/contributing-to-the-mariadb-project/ Feb 08 14:47:39 ip-172-31-22-142 mysqld_safe: 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: 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: Started MariaDB database server.
We recommend you make sure that this installation is secure and to do so run following command.
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.
Now you can exit from MariaDB prompt using following command.
We will have to install PHP. To do so run following commands as shown below.
If in case you don't have wget package already installed on your system then you can install it using
yum -y install wget.
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
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.
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
Now disable SELinux temporarily using this below given command.
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.
Please click on Start installation button available in right corner at the bottom and you'll see a web page like this.
Click on I accept button to agree to license terms.
On the Pre-installation check page, confirm that all of your current settings meet LimeSurvey's requirements, and then click the Next button.
On the Database configuration page, input your database info, and then click the Next button.
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.
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.
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.