Bonjour,
Voici comment installer LimeSurvey.
Installer les dépendances :
yum install -y php-mysqli php-fpm php-common php-iconv php-curl php-mbstring php-xmlrpc php-soap php-zip php-gd php-xml php-intl php-json php-ldap nginx mariadb-server unzip wget
systemctl enable --now php-fpm nginx mariadb
Configurer MariaDB :
mysql_secure_installation
mysql -u root -p
CREATE DATABASE limesurvey;
CREATE USER 'limesurvey'@localhost IDENTIFIED BY 'my_password';
GRANT ALL PRIVILEGES ON limesurvey.* TO 'limesurvey'@localhost IDENTIFIED BY 'my_password';
FLUSH PRIVILEGES;
EXIT
Télécharger LimeSurvey :
wget https://download.limesurvey.org/latest-stable-release/limesurvey5.3.7+220328.zip
Installer LimeSurvey :
unzip limesurvey5.3.7+220328.zip && rm limesurvey5.3.7+220328.zip
mkdir -p /var/www /root/.ssl
mv limesurvey /var/www
chown -R nginx: /var/www/limesurvey
chmod -R 777 /var/www/limesurvey/application/config
chmod -R 777 /var/www/limesurvey/upload
chmod -R 777 /var/www/limesurvey/tmp
Nginx avec LimeSurvey :
nano /etc/nginx/conf.d/limesurvey.conf
server {
listen 443 ssl http2;
server_name limesurvey.my_domain.com;
root /var/www/limesurvey;
index index.php;
access_log /var/log/nginx/limesurvey-access.log;
error_log /var/log/nginx/limesurvey-error.log error;
# allow larger file uploads and longer script runtimes
#client_max_body_size 100m;
#client_body_timeout 120s;
#sendfile off;
# SSL Configuration
ssl_certificate /root/.ssl/limesurvey.my_domain.com.crt;
ssl_certificate_key /root/.ssl/limesurvey.my_domain.com.key;
ssl_session_cache shared:SSL:10m;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384";
ssl_prefer_server_ciphers on;
# See https://hstspreload.org/ before uncommenting the line below.
# add_header Strict-Transport-Security "max-age=15768000; preload;";
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
add_header X-Robots-Tag none;
add_header Content-Security-Policy "frame-ancestors 'self'";
add_header X-Frame-Options DENY;
add_header Referrer-Policy same-origin;
# Deny all attempts to access hidden files
# such as .htaccess, .htpasswd, .DS_Store (Mac).
location ~ /\. {
deny all;
}
# Disallow direct read user upload files
location ~ ^/upload/surveys/.*/fu_[a-z0-9]*$ {
return 444;
}
# Disallow uploaded potential executable files in upload directory
location ~* /upload/.*\.(pl|cgi|py|pyc|pyo|phtml|sh|lua|php|php3|php4|php5|php6|pcgi|pcgi3|pcgi4|pcgi5|pcgi6|icn)$ {
return 444;
}
# Avoid processing of calls to unexisting static files by yii
location ~ \.(js|css|png|jpg|gif|swf|ico|pdf|mov|fla|zip|rar)$ {
try_files $uri =404;
}
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ ^(.+\.php)(.*)$ {
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_index index.php;
fastcgi_pass php-fpm;
include /etc/nginx/mime.types;
include fastcgi_params;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location ~ /\.ht {
deny all;
}
}
systemctl restart nginx
Voilà vous pouvez vous connecter sur votre application.