Before we begin, I'm really no expert when it comes to this stuff, so most of what I've 'learnt' to put together this guide has come from other threads on this forum (e.g. here) and from Google searches. If you attempt this and it doesn't work, I may not be able to help you troubleshoot very far, so be warned!
LimeSurvey, as the name would suggest, is an open-source online survey tool which can be used to create some really great surveys. Think of it as your own SurveyMonkey without any of the limitations that you might get trying to use the free version. It probably takes a little more time to get your head around the user interface, but once you have I'd say it was even more powerful and much more customisable.
I've built and run a number of surveys on mine, although the first jail I built was using a 11.1-RELEASE template that just wouldn't upgrade to 11.3. That gave me a perfect opportunity to rebuild it and document the process, hence this guide :)
<JAIL_NAME> with the name you want the iocage jail to have (I have used 'limesurvey')
<JAIL_IP> with the IP address you want the jail to have, within a useable range
<IPV4_DEFAULT_GATEWAY> with the value in Network > Global Configuration
Console into jail
Code:
iocage console limesurvey
Install packages
It's probably worth updating the jail before you start
Code:
pkg update
pkg upgrade
Code:
pkg install mariadb103-server
pkg install php74 php74-mbstring php74-pdo php74-session php74-openssl php74-fileinfo php74-pdo_mysql php74-imap
php74-gd php74-zip php74-zlib mod_php74 php74-mysqli php74-extensions php74-pecl-APCu php74-bcmath php74-bz2 php74-calendar
php74-curl php74-dba php74-exif php74-ftp php74-gettext php74-mysqli php74-mbstring php74-ldap
pkg install apache24 (installed as PHP dependency above)
pkg install nano (I find this much easier than vi or ee)
service apache24 start && service php-fpm start && service mysql-server start
mysql -e "CREATE DATABASE limesurvey;"
mysql -e "GRANT ALL PRIVILEGES ON limesurvey.* TO 'lsuser'@'localhost' IDENTIFIED
BY 'lspass';"
mysql -e "FLUSH PRIVILEGES;"
mysql_secure_installation
Download LimeSurvey
Right, I'm sure there is a much better way of doing this, but I downloaded from here and saved to a temp folder I have mounted on my pool (e.g. /mnt/pool/temp/). I uncompressed the download, which created a limesurvey folder. I then mounted the temp folder on my pool to the /temp folder inside the jail and moved it to the correct location for apache. Feel free to do this in a much better way :D
Still inside the jail
Code:
mkdir /temp
exit
From the FreeNAS CLI
Code:
iocage fstab -a limesurvey '/mnt/pool/temp/ /temp nullfs rw 0 0'
iocage console limesurvey
cd /temp
mv limesurvey /usr/local/www/apache24/
cd /usr/local/www/apache24
rm -rf data
mv limesurvey data
chown -R www:www /usr/local/www/apache24/data
Are you still with me, as we're almost there!
Apache configuration
Code:
nano /usr/local/etc/apache24/httpd.conf
enable: LoadModule php7_module libexec/apache24/libphp7.so
add: AddType application/x-httpd-php .php (on line below the one enabled above)
add: index.php into <IfModule dir_module> DirectoryIndex index.php index.html</IfModule>
add: after the <Files> section
<FilesMatch "\.php$">
SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch "\.phps$">
SetHandler application/x-httpd-php-source
</FilesMatch>
Restart Apache
Code:
apachectl graceful
In theory, if you browser to the <JAIL_IP> you specified right at the beginning when creating the iocage jail, you should see the LimeSurvey configuration screen.
You'll can also change the default Admin user password, add an e-mail address and even change the site name if you want!
Other configuration
You should end up with a LimeSurvey login screen, or if not go to http://<JAIL_IP>/admin
The default password if you didn't change it is password :D
Here's a link to the manual pages describing the installation and configuration. Much of this is based around that.
Lastly, if you are thinking of using this externally, I'd recommend a domain name and another jail configured as an NGINX reverse proxy with Letsencrypt for SSL certificates to protect it, although that's a whole different "How-To" guide, but if you search the forum you'll probably find something that would help ;)
This is only my 2nd attempt at a [How-To] guide, so please be gentle!
I'll make a note of any changes made here:
18-July-2022 - Updated instructions for a jail based on 13.1-RELEASE (PHP7.3 unsupported) although still keeping mariadb and PHP quite old so I can use the same database. Will look to update these once I have it working in the new jail.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.