Install LimeSurvey CE - Custom Survey Tool - on Linux 🌱

What is LimeSurvey?

[LimeSurvey is] a powerful, open-source survey platform. A free alternative to SurveyMonkey, Typeform, Qualtrics, and Google Forms, making it simple to create online surveys and forms with unmatched flexibility. - https://github.com/LimeSurvey/LimeSurvey

Installation

  1. Log into the Linux device
  2. Run the following commands in a terminal:
    # update software repositories
    sudo apt update
    # install any available software updates
    sudo apt upgrade -y
    # install Apache HTTPD and MySQL
    sudo apt install apache2 mariadb-server mariadb-client wget zip -y
    # install PHP components
    sudo apt install php php-mysql php-common php-gd php-mbstring php-xml php-ldap php-intl php-zip php-imap -y
    # configure the MySQL database
    sudo mysql_secure_installation
  3. Press Enter to login as root
  4. Type N and press Enter to not switch to socket authentication
  5. Type Y and press Enter to set a root password, type the password twice to confirm
  6. Type Y and press Enter to remove anonymous users
  7. Type Y and press Enter to disallow root login remotely
  8. Type Y and press Enter to remove the test database
  9. Type Y and press Enter to reload privilege tables
  10. Run the following command to login into MySQL:
    sudo mysql -u root -p
  11. Authenticate with the root password set earlier
  12. Run the following commands to create the limesurvey database and database user
    CREATE DATABASE limesurvey DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
    GRANT ALL ON limesurvey.* TO 'limesurvey_rw'@'localhost' IDENTIFIED BY 'L!m3Surv3Y';
    FLUSH PRIVILEGES;
    EXIT;
  13. Continue with the following commands to download and extract LimeSurvey to the webroot
    # fetch the latest download URL
    regex='"(https:\/\/download.limesurvey.org\/latest-master\/limesurvey[^/]*\.zip)"' && response=$(curl https://community.limesurvey.org/downloads/) && [[ $response =~ $regex ]] && downloadURL="${BASH_REMATCH[1]}"
    # download latest limesurvey version
    sudo wget -O /tmp/limesurvey.zip $downloadURL
    # extract the downloaded zip archive
    sudo unzip /tmp/limesurvey.zip -d /var/www/html
    # set ownership
    sudo chown -R www-data:www-data /var/www/html/limesurvey
    # set permissions
    sudo chmod -R 755 /var/www/html/limesurvey/tmp && sudo chmod -R 755 /var/www/html/limesurvey/upload && sudo chmod -R 755 /var/www/html/limesurvey/application/config/
  14. Open a web browser and navigate to http://DNSorIP/limesurvey
  15. Select a Language > Click Start installation at the Welcome screen
  16. Click I accept at the License Agreement
  17. Click Next at the Pre-Installation Check
  18. Complete the Database Configuration as shown below

    Database type: MySQL
    MySQL database engine type: MyISAM

    Database location: localhost
    Database user: limesurvey_rw
    Database Password: L!m3Surv3Y
    Database name: limesurvey

    Table Prefix:

  19. Click Next > Click Populate database
  20. Complete the Administration settings form > Click Next
  21. Click Administration
  22. Login using the admin credentials created earlier
  23. Welcome to LimeSurvey

Source: https://manual.limesurvey.org/Installation_-_LimeSurvey_CE