Install LimeSurvey CE on Alibaba Cloud


  • You must have Alibaba Cloud Elastic Compute Service (ECS) activated and verified your valid payment method. If you don’t know how to setup your ECS instance, you can refer to this tutorial or quick-start guide. Your ECS instance must have at least 1GB RAM and 1 Core processor.
  • A domain name registered from Alibaba Cloud. If you have already registered a domain from Alibaba Cloud or any other host, you can update its domain nameserver records.
  • Domain name must be pointed to your Alibaba Cloud ECS’s IP address
  • Access to VNC console in your Alibaba Cloud or SSH client installed in your PC
  • Set up your server’s hostname and create user with root privileges.

Setting up Your Environment

Setting up Your Server

Before proceeding with installation of any kind of package, use the following command to update your Ubuntu system. To run this command, remember to login from non-root user with sudo privileges.

# sudo apt update && sudo apt upgrade

Installing PHP

Limesurvey requires PHP 5.5.9 or later. In this tutorial, you will install PHP 7.2. To do so, run the following steps.

# sudo apt-get install software-properties-common python-software-properties
# sudo add-apt-repository ppa:ondrej/php
# sudo apt update
# sudo apt install -y php7.2

Installing Required PHP Extensions

LimeSurvey CE requires the following PHP extensions:

  1. php7.2-cli
  2. php7.2-fpm
  3. php7.2-common
  4. php7.2-mysql
  5. php7.2-ldap
  6. php7.2-imap
  7. php7.2-gd
  8. php7.2-mbstring
  9. php7.2-zip
  10. php7.2-xml
# sudo apt-get -y install php7.2-xml php7.2-mbstring php7.2-common php7.2-mysql php7.2-fpm php7.2-cli php7.2-gd php7.2-zip php7.2-imap php7.2-ldap
# php --version

Installing MariaDB

LimeSurvey CE supports MySQL, PostgreSQL, MSSQL and SQLite. In this tutorial, you will use MariaDB server for MySQL. By default, Ubuntu repository has older version of MariaDB server. To use new version of MariaDB, you will need to add MariaDB repository to your Ubuntu system. To do so, follow the steps below.

# sudo apt-key adv --recv-keys --keyserver hkp:// 0xF1656F24C74CD1D8
# sudo add-apt-repository 'deb [arch=amd64,i386,ppc64el] xenial main'
# sudo apt update
# sudo apt install -y mariadb-server
# sudo systemctl start mariadb
# sudo systemctl enable mariadb
# sudo mysql_secure_installation
# sudo mysql -u root -p
CREATE USER 'aareez'@'localhost' IDENTIFIED BY '654321Ab';
GRANT ALL PRIVILEGES ON lime.* TO 'aareez'@'localhost';

Installing Unzip

You will need to install unzip which will be used to unzip the compressed zip folder. To install unzip, run the command.

# sudo apt-get install unzip -y

Installing and Setting up LimeSurvey CE

To install LimeSurvey CE, you will need to follow the steps.

# cd /var/www/html
# sudo chown -R aareez:aareez /var/www/html
# sudo rm index.html
# wget
# unzip
# rm
# sudo chown -R www-data:www-data /var/www/html

Configuring the Apache Server

Create virtual host configuration file for LimeSurvey CE by running the following command. After you run this command, a file will be opened in nano text editor.

# sudo nano /etc/apache2/sites-available/lime.conf
<VirtualHost *:80> 
DocumentRoot /var/www/html/limesurvey/
DirectoryIndex index.php index.htm index.html
<Directory /var/www/html>
Options FollowSymLinks
AllowOverride All
ErrorLog ${APACHE_LOG_DIR}/LimeSurvey_error.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/LimeSurvey_access.log combined
# sudo a2dissite 000-default.conf
# sudo a2ensite lime
# sudo a2enmod rewrite
# sudo a2enmod ssl
# sudo service apache2 restart

Installing the SSL Certificate

We will install SSL certificate using Let’s Encrypt with Certbot. To do so, run the following steps.

# sudo apt-get update
# sudo apt-get install software-properties-common
# sudo add-apt-repository ppa:certbot/certbot
# sudo apt-get update
# sudo systemctl stop apache2
# sudo apt-get install python-certbot-apache
# sudo certbot --apache -d
# sudo systemctl start apache2

Setting up Firewalls and Ports

If you have activated firewalls, you will have to define a rule in Alibaba Cloud security group for your cloud server to add exception for port 80/tcp and 443/tcp. You can enable these ports while creating ECS instance, but in case if you forgot to unblock these ports, you can follow the procedure in this guide: Add security group rules.

Original Source



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Alibaba Cloud

Alibaba Cloud

Follow me to keep abreast with the latest technology news, industry insights, and developer trends. Alibaba Cloud website: