مرکز آموزش

LimeSurvey Print

  • 0

How to Install LimeSurvey Community Edition on Ubuntu 24.04

This guide explains how to manually install LimeSurvey Community Edition on Ubuntu 24.04 LTS. These are the same installation steps automated by the Ansible playbook, but written for beginners so you can follow them one command at a time.


System Requirements

  • Ubuntu 24.04 LTS
  • Sudo user account
  • Internet connection
  • Minimum 2 GB RAM
  • At least 20 GB free disk space

Step 1 - Update Ubuntu

Before installing any software, update your server to ensure you have the latest security updates and package versions.

sudo apt update
sudo apt upgrade -y
sudo apt autoremove -y

After the update finishes, reboot the server if Ubuntu installs a new kernel.

sudo reboot

Step 2 - Install Apache Web Server

Install Apache:

sudo apt install apache2 -y

Enable Apache to start automatically:

sudo systemctl enable apache2
sudo systemctl start apache2

Verify that Apache is running:

sudo systemctl status apache2

You should see:

Active: active (running)

Step 3 - Install PHP 8.3

Ubuntu 24.04 includes PHP 8.3, which is supported by LimeSurvey 7.

sudo apt install -y \
php8.3 \
php8.3-cli \
php8.3-common \
libapache2-mod-php8.3 \
php8.3-mysql \
php8.3-mbstring \
php8.3-xml \
php8.3-gd \
php8.3-zip \
php8.3-curl \
php8.3-imap \
php8.3-ldap \
php8.3-soap

Step 4 - Install MariaDB

sudo apt install mariadb-server mariadb-client -y

Enable and start MariaDB:

sudo systemctl enable mariadb
sudo systemctl start mariadb

Check the service:

sudo systemctl status mariadb

Step 5 - Secure MariaDB

Run the security wizard:

sudo mysql_secure_installation

Answer Yes to the recommended security options.


Step 6 - Create the LimeSurvey Database

Open MariaDB:

sudo mariadb

Create the database:

CREATE DATABASE limesurveydb
CHARACTER SET utf8mb4
COLLATE utf8mb4_unicode_ci;

Create the database user:

CREATE USER 'limesurveyuser'@'localhost'
IDENTIFIED BY 'LimeSurvey@2026#Secure91';

Grant permissions:

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

FLUSH PRIVILEGES;
EXIT;

Step 7 - Download LimeSurvey

cd /tmp

wget https://download.limesurvey.org/latest-master/limesurvey7.0.7%2B260729.zip \
-O limesurvey.zip

Install unzip:

sudo apt install unzip -y

Step 8 - Extract LimeSurvey

sudo mkdir -p /var/www/limesurvey

sudo unzip /tmp/limesurvey.zip \
-d /var/www/limesurvey

Step 9 - Configure Permissions

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

sudo find /var/www/limesurvey -type d -exec chmod 755 {} \;

sudo find /var/www/limesurvey -type f -exec chmod 644 {} \;

sudo chmod -R 775 /var/www/limesurvey/tmp

sudo chmod -R 775 /var/www/limesurvey/upload

sudo chmod -R 775 /var/www/limesurvey/application/config

Step 10 - Create the Apache Virtual Host

Create the configuration file:

sudo nano /etc/apache2/sites-available/limesurvey.conf

Paste the following configuration:

<VirtualHost *:80>

ServerName YOUR_SERVER_IP

DocumentRoot /var/www/limesurvey

<Directory /var/www/limesurvey>
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>

DirectoryIndex index.php index.html

ErrorLog ${APACHE_LOG_DIR}/limesurvey_error.log
CustomLog ${APACHE_LOG_DIR}/limesurvey_access.log combined

</VirtualHost>

Enable the site:

sudo a2ensite limesurvey.conf
sudo a2dissite 000-default.conf
sudo a2enmod rewrite
sudo systemctl reload apache2

Step 11 - Open LimeSurvey

Open your web browser and browse to:

http://YOUR_SERVER_IP

The LimeSurvey installation wizard should appear.


Database Settings

Setting Value
Database Type MySQL
Host localhost
Database Name limesurveydb
Database User limesurveyuser
Password LimeSurvey@2026#Secure91
Table Prefix lime_

Conclusion

You have successfully installed LimeSurvey Community Edition on Ubuntu 24.04. Your survey platform is now ready to use. You can begin creating surveys, managing users, and collecting responses through the LimeSurvey web interface.


آیا این پاسخ به شما کمک کرد؟
Back