How to Install LimeSurvey on Alpine Linux

LimeSurvey is an open-source survey application. In this tutorial, we will show you how to install LimeSurvey on Alpine Linux.

Prerequisites

Before proceeding with the installation, ensure that your system meets the following prerequisites:

Step 1: Install LAMP Stack

Before installing LimeSurvey, you need to install the LAMP stack on your system. You can install it by running the following commands:

sudo apk update
sudo apk add apache2 php7 php7-apache2 php7-mysqli php7-gd php7-xml php7-curl php7-zip php7-json mysql mysql-client

Once the installation is completed, start the Apache and MySQL services and enable them to start at boot time:

sudo rc-update add apache2
sudo rc-update add mysql
sudo service apache2 start
sudo service mysql start

Step 2: Download and Extract LimeSurvey

Download the latest version of LimeSurvey from their official website by running the following command:

wget https://www.limesurvey.org/stable-release?download=2386:limesurvey400plus-build211221-targz -O limesurvey.tgz

Extract the downloaded file to the /var/www/ directory:

sudo tar -xzvf limesurvey.tgz -C /var/www/

Step 3: Configure Apache for LimeSurvey

Create a new virtual host configuration file for LimeSurvey:

sudo nano /etc/apache2/conf.d/limesurvey.conf

Add the following configuration in the file:

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/limesurvey
    <Directory /var/www/limesurvey/>
        Options FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>
    ErrorLog /var/log/apache2/limesurvey_error.log
    CustomLog /var/log/apache2/limesurvey_access.log combined
</VirtualHost>

Save and close the file.

Next, enable the rewrite module in Apache:

sudo a2enmod rewrite

Restart the Apache service to apply the changes:

sudo service apache2 restart

Step 4: Configure MySQL for LimeSurvey

Create a new database and a user account for LimeSurvey:

mysql -u root -p

Enter the MySQL root password when prompted.

Create a new database:

CREATE DATABASE limesurvey CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

Create a new user with the name limesurveyuser and the password password:

CREATE USER 'limesurveyuser'@'localhost' IDENTIFIED BY 'password';

Grant all privileges to the limesurveyuser on the limesurvey database:

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

Flush the privileges and exit the MySQL prompt:

FLUSH PRIVILEGES;
EXIT;

Step 5: Configure LimeSurvey

Open your web browser and navigate to http://localhost/admin.

Follow the instructions on the screen to configure LimeSurvey:

Congratulations! You have successfully installed LimeSurvey on Alpine Linux.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!