{"id":7388,"date":"2018-12-04T13:31:32","date_gmt":"2018-12-04T10:31:32","guid":{"rendered":"https:\/\/www.howtoforge.com\/how-to-install-limesurvey-ce-on-centos-7\/"},"modified":"2018-12-04T13:31:32","modified_gmt":"2018-12-04T10:31:32","slug":"how-to-install-limesurvey-ce-on-centos-7","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/how-to-install-limesurvey-ce-on-centos-7\/","title":{"rendered":"How to Install LimeSurvey (CE) on CentOS 7"},"content":{"rendered":"<p><span><span>LimeSurvey\u00a0<\/span>is an open source survey software written in PHP. LimeSurvey source code is hosted on<span>\u00a0GitHub<\/span><\/span><span>.\u00a0<span>In this tutorial, we will walk you through the\u00a0LimeSurvey\u00a0<span>Community Edition (CE)<\/span>\u00a0installation process on a fresh\u00a0CentOS 7 system.<\/span><\/span><\/p>\n<h2 id=\"requirements\">Requirements<\/h2>\n<p>In order to install LimeSurvey (CE) on your CentOS 7 system, m<span>ake sure your\u00a0system meets the following requirements:<\/span><\/p>\n<ul>\n<li>Minimum 250 MB disk space.<\/li>\n<li><span>MySQL 5.5.3 or later or MariaDB 5.5 or later. This tutorial will use MariaDB.<\/span><\/li>\n<li><span><span><span>PHP 5.5.9 or later (<em>PHP\u00a07.0.0+ is recommended<\/em><\/span><\/span><\/span><span><span>) with the following extensions:\u00a0<\/span><\/span>Mbstring, PDO database driver for MySQL or PostgreSQL, GD-Library, IMAP, LDAP, ZIP.<\/li>\n<li>Apache 2.4 or later or Nginx 1.1 or later. This tutorial will use Nginx.<\/li>\n<\/ul>\n<h2 id=\"initial-steps\">Initial steps<\/h2>\n<p>Check\u00a0your CentOS system version:<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">cat \/etc\/centos-release<br\/># CentOS Linux release 7.5.1804 (Core)<\/code><\/pre>\n<p>Set up the timezone:<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">timedatectl list-timezones<br\/>sudo timedatectl set-timezone 'Region\/City'<\/code><\/pre>\n<p><span>Update your operating system\u2019s packages:<\/span><\/p>\n<pre class=\"command\"><code spellcheck=\"false\">sudo yum update\u00a0-y<\/code><\/pre>\n<p>Install vim, git, unzip, and socat packages:<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">sudo yum install -y vim git unzip socat<\/code><\/pre>\n<h2 id=\"step-install-nodejs-and-npm\">Step 1 &#8211; Install PHP<\/h2>\n<p>LimeSurvey\u00a0requires PHP version\u00a0<span>5.5.9<\/span> or greater, while PHP 7.0.0+ is the recommended version. Default CentOS repositories contain older version of PHP, and thus we will need to set up a third-party repository to install a newer PHP version. We will use Webtatic repository.<\/p>\n<p>Setup the Webtatic YUM repo:<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">sudo rpm -Uvh https:\/\/mirror.webtatic.com\/yum\/el7\/webtatic-release.rpm<\/code><\/pre>\n<p>Install PHP, as well as the necessary PHP extensions:<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">sudo yum install -y php72w php72w-cli php72w-fpm php72w-common php72w-mbstring php72w-xml php72w-mysql php72w-gd php72w-zip php72w-ldap php72w-imap<\/code><\/pre>\n<p>Check the PHP version:<\/p>\n<pre class=\"command\" readability=\"5\"><code spellcheck=\"false\" readability=\"4\">php --version<p>#\u00a0PHP 7.2.12 (cli) (built: Nov\u00a011 2018 14:54:16) ( NTS )<br\/># Copyright (c) 1997-2018 The PHP Group<br\/>#\u00a0Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies<\/p><\/code><\/pre>\n<p>Start and enable PHP-FPM service:<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">sudo systemctl start php-fpm.service<br\/>sudo systemctl enable php-fpm.service<\/code><\/pre>\n<h2 id=\"step-installnbspmysql-and-create-a-database-for-croogo\">Step 2 &#8211; Install\u00a0MariaDB and create a database for\u00a0LimeSurvey<\/h2>\n<p><span>Install MariaDB database server:<\/span><\/p>\n<pre class=\"command\"><code spellcheck=\"false\">sudo yum install -y mariadb-server<\/code><\/pre>\n<p>Check the MariaDB version:<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">mysql --version<br\/># mysql Ver 15.1 Distrib 5.5.60-MariaDB, for Linux (x86_64) using readline 5.1<\/code><\/pre>\n<p>Start and enable MariaDB service:<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">sudo systemctl start mariadb.service<br\/>sudo systemctl enable mariadb.service<\/code><\/pre>\n<p>Run<span>\u00a0<\/span><code>mysql_secure installation<\/code><span>\u00a0<\/span>script to improve MariaDB security and set the password for MariaDB<span>\u00a0<\/span><code>root<\/code><span>\u00a0<\/span>user:<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">sudo mysql_secure_installation<\/code><\/pre>\n<p><span>Answer all the questions as shown below:<\/span><\/p>\n<pre><code spellcheck=\"false\">Enter current password for root (enter for none):<br\/>Set root password? [Y\/n]: Y<br\/>Remove anonymous users? [Y\/n]: Y<br\/>Disallow root login remotely? [Y\/n]: Y<br\/>Remove test database and access to it? [Y\/n]: Y<br\/>Reload privilege tables now? [Y\/n]: Y<\/code><\/pre>\n<p>Log into MariaDB shell as the user root:<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">mysql -u root -p<br\/># Enter password<\/code><\/pre>\n<p>Create a MariaDB database and user that you will use for your installation of LimeSurvey, and remember the credentials:<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">CREATE DATABASE dbname;<br\/>GRANT ALL ON dbname.* TO 'username' IDENTIFIED BY 'password';<br\/>FLUSH PRIVILEGES;<\/code><\/pre>\n<p>Exit from MariaDB shell:<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">quit<\/code><\/pre>\n<h2 id=\"step-install-and-configurenbspnginx\">Step 3 &#8211; Install and configure\u00a0Nginx<\/h2>\n<p>Install Nginx webserver:<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">sudo yum install -y nginx<\/code><\/pre>\n<p>Check the NGINX version:<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">nginx -v<br\/># nginx version: nginx\/1.12.2<\/code><\/pre>\n<p>Start and enable Nginx service:<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">sudo systemctl start nginx.service<br\/>sudo systemctl enable nginx.service<\/code><\/pre>\n<p><span>Run<span>\u00a0<\/span><\/span><code>sudo vim \/etc\/nginx\/conf.d\/limesurvey.conf<\/code><span><span>\u00a0<\/span>and populate the file with the following configuration:<\/span><\/p>\n<pre>server {&#13; listen 80;&#13;\n&#13; server_name example.com;&#13; root \/var\/www\/limesurvey;&#13;\n&#13; index index.php;&#13;\n&#13; location \/ {&#13; try_files $uri $uri\/ \/index.php?$args;&#13; }&#13; &#13; location ~ \\.php$ {&#13; try_files $uri =404;&#13; include fastcgi_params;&#13; fastcgi_pass 127.0.0.1:9000;&#13; fastcgi_index index.php;&#13; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;&#13; }&#13;\n&#13;\n}<\/pre>\n<p>Test the NGINX configuration.<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">sudo nginx -t<\/code><\/pre>\n<p>Reload NGINX.<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">sudo systemctl reload nginx.service<\/code><\/pre>\n<h2 id=\"step-install-and-configurenbspnginx\">Step 4 &#8211; Download and install\u00a0LimeSuervey<\/h2>\n<p>Create a document root directory:<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">sudo mkdir -p \/var\/www\/limesurvey<\/code><\/pre>\n<p>Change ownership of the<span>\u00a0<\/span><code>\/var\/www\/limesurvey<\/code><span>\u00a0<\/span>directory to<span>\u00a0<\/span><code>johndoe:<\/code><\/p>\n<pre class=\"command\"><code spellcheck=\"false\">sudo chown -R [your_user]:[your_user] \/var\/www\/limesurvey<\/code><\/pre>\n<p>Navigate to document root:<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">cd \/var\/www\/limesurvey<\/code><\/pre>\n<p>Download the\u00a0LimeSurvey ZIP installer:<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">wget https:\/\/www.limesurvey.org\/stable-release?download=2514:limesurvey3155%20181115zip -O limesurvey.zip<\/code><\/pre>\n<p>Unzip\u00a0LimeSurvey installer:<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">unzip limesurvey.zip<br\/>rm limesurvey.zip<br\/>mv limesurvey\/* . &amp;&amp; mv limesurvey\/.* .<br\/>rmdir limesurvey<\/code><\/pre>\n<p>Change ownership of the<span>\u00a0<\/span><code>\/var\/www\/limesurvey<\/code><span>\u00a0<\/span>directory to<span>\u00a0<\/span><code>nginx:<\/code><\/p>\n<pre class=\"command\"><code spellcheck=\"false\">sudo chown -R nginx:nginx \/var\/www\/limesurvey<\/code><\/pre>\n<p>Create the directory<span\/><code>\/var\/lib\/php\/session<\/code><span><span\/> and set ownership to<span>\u00a0<\/span><\/span><code>nginx<\/code><span>.<\/span><\/p>\n<pre class=\"command\"><code spellcheck=\"false\">sudo mkdir -p \/var\/lib\/php\/session &amp;&amp; sudo chown -R nginx:nginx \/var\/lib\/php<\/code><\/pre>\n<p>Run<span>\u00a0<\/span><code>sudo vim \/etc\/php-fpm.d\/www.conf<\/code><span>\u00a0<\/span>and set the user and group to<span>\u00a0<\/span><code>nginx<\/code>. Initially, they will be set to<span>\u00a0<\/span><code>apache:<\/code><\/p>\n<pre class=\"command\"><code spellcheck=\"false\">sudo vim \/etc\/php-fpm.d\/www.conf<br\/># user = nginx<br\/># group = nginx<\/code><\/pre>\n<p>Restart the PHP-FPM service:<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">sudo systemctl restart php-fpm.service<\/code><\/pre>\n<h2 id=\"step-complete-the-cachet-setup\">Step 5 &#8211; Complete the LimeSurvey setup<\/h2>\n<p><span>Open your web browser and type the URL<span>\u00a0<\/span><\/span><strong>http:\/\/example.com<\/strong><span>. You will be redirected to the following page:<\/span><\/p>\n<p><span><a class=\"fancybox\" id=\"img-Screenshot_2018-12-03_at_15.50_.12_\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_limesurvey_ce_on_centos_7\/big\/Screenshot_2018-12-03_at_15.50_.12_.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/12\/how-to-install-limesurvey-ce-on-centos-7.png\" alt=\"LimeSurvey Installer\" width=\"550\" height=\"316\" title=\"\"><\/a><\/span><\/p>\n<p><span>Select your preferred language and\u00a0<span>click on the<span>\u00a0<\/span><\/span><strong>Start Installation<\/strong><span><span>\u00a0<\/span>button. AfterThe LimeSurvey license page should appear.<\/span><\/span><\/p>\n<p><span><span><a class=\"fancybox\" id=\"img-Screenshot_2018-12-03_at_15.54_.10_\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_limesurvey_ce_on_centos_7\/big\/Screenshot_2018-12-03_at_15.54_.10_.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/12\/how-to-install-limesurvey-ce-on-centos-7-1.png\" alt=\"Accept the license\" width=\"550\" height=\"316\" title=\"\"><\/a><\/span><\/span><\/p>\n<p>Check and click on the <strong>I accept<\/strong>\u00a0button if you agree with the license terms. After this step, y<span>ou should see the LimeSurvey pre-installation check\u00a0page:<\/span><\/p>\n<p><span><a class=\"fancybox\" id=\"img-Screenshot_2018-12-03_at_15.58_.42_\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_limesurvey_ce_on_centos_7\/big\/Screenshot_2018-12-03_at_15.58_.42_.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/12\/how-to-install-limesurvey-ce-on-centos-7-2.png\" alt=\"pre-installation check\" width=\"550\" height=\"316\" title=\"\"><\/a><\/span><\/p>\n<p><span>Make sure all the requirements are completed, then click on the<span>\u00a0<\/span><\/span><strong>Next<\/strong><span><span>\u00a0<\/span>button.<span>\u00a0This should direct you to the database configuration page.<\/span><\/span><\/p>\n<p><a class=\"fancybox\" id=\"img-Screenshot_2018-12-03_at_16.03_.47_\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_limesurvey_ce_on_centos_7\/big\/Screenshot_2018-12-03_at_16.03_.47_.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/12\/how-to-install-limesurvey-ce-on-centos-7-3.png\" alt=\"Database configuration\" width=\"550\" height=\"316\" title=\"\"><\/a><\/p>\n<p><span>Enter the database settings you want to use for LimeSurvey and click on the <strong>Next<\/strong> button.\u00a0<span><span>\u00a0<\/span>You should see the following page:<\/span><\/span><\/p>\n<p><a class=\"fancybox\" id=\"img-Screenshot_2018-12-03_at_16.06_.04_\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_limesurvey_ce_on_centos_7\/big\/Screenshot_2018-12-03_at_16.06_.04_.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/12\/how-to-install-limesurvey-ce-on-centos-7-4.png\" alt=\"Database settings\" width=\"550\" height=\"316\" title=\"\"><\/a><\/p>\n<p><span>Click on the<span>\u00a0<\/span><\/span><strong>Populate database<\/strong><span><span>\u00a0<\/span>button. You should see the following page:<\/span><\/p>\n<p><span><a class=\"fancybox\" id=\"img-Screenshot_2018-12-03_at_16.07_.44_\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_limesurvey_ce_on_centos_7\/big\/Screenshot_2018-12-03_at_16.07_.44_.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/12\/how-to-install-limesurvey-ce-on-centos-7-5.png\" alt=\"Administration settings\" width=\"550\" height=\"316\" title=\"\"><\/a><\/span><\/p>\n<p><span>Here, provide your admin username and password, site name, email address, then click on the<span>\u00a0<\/span><\/span><strong>Next<\/strong><span><span>\u00a0<\/span>button. Once the installation has been completed, you should see the following page:<\/span><\/p>\n<p><span><a class=\"fancybox\" id=\"img-Screenshot_2018-12-03_at_16.11_.05_\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_limesurvey_ce_on_centos_7\/big\/Screenshot_2018-12-03_at_16.11_.05_.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/12\/how-to-install-limesurvey-ce-on-centos-7-6.png\" alt=\"LimeSurvey installed successfully\" width=\"550\" height=\"316\" title=\"\"><\/a><br \/><\/span><\/p>\n<p><span><span>Now, click on the<span>\u00a0<\/span><\/span><strong>Administration<\/strong><span><span>\u00a0<\/span>button. You should see the following page:<\/span><\/span><\/p>\n<p><a class=\"fancybox\" id=\"img-Screenshot_2018-12-03_at_16.12_.16_\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_limesurvey_ce_on_centos_7\/big\/Screenshot_2018-12-03_at_16.12_.16_.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/12\/how-to-install-limesurvey-ce-on-centos-7-7.png\" alt=\"Log-in\" width=\"550\" height=\"316\" title=\"\"><\/a><\/p>\n<p><span>Provide your login details, then click on the<span>\u00a0<\/span><\/span><strong>Log In<\/strong><span><span>\u00a0<\/span>button. You should see the LimeSurvey administration interface:<\/span><\/p>\n<p><span><a class=\"fancybox\" id=\"img-Screenshot_2018-12-03_at_16.13_.46_1\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_limesurvey_ce_on_centos_7\/big\/Screenshot_2018-12-03_at_16.13_.46_1.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/12\/how-to-install-limesurvey-ce-on-centos-7-8.png\" alt=\"Lime Survey Dashboard\" width=\"550\" height=\"316\" title=\"\"><\/a><\/span><\/p>\n<h2 id=\"step-complete-the-cachet-setup\">Links<\/h2>\n","protected":false},"excerpt":{"rendered":"<p>LimeSurvey\u00a0is an open source survey software written in PHP. LimeSurvey source code is hosted on\u00a0GitHub.\u00a0In this tutorial, we will walk you through the\u00a0LimeSurvey\u00a0Community Edition (CE)\u00a0installation process on a fresh\u00a0CentOS 7 system. Requirements In order to install LimeSurvey (CE) on your CentOS 7 system, make sure your\u00a0system meets the following requirements: Minimum 250 MB disk space. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[36],"tags":[],"class_list":["post-7388","post","type-post","status-publish","format-standard","hentry","category-36"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/7388","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/comments?post=7388"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/7388\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=7388"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=7388"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=7388"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}