본문 바로가기
Ubuntu/Ubuntu22.04

Limesurvey Self-Hosting Installation [2] : nginx, php-fpm

by 거인과난쟁이 2024. 7. 30.

- Ubuntu22.04 (tested 22.04.4)

# dependencies
sudo apt update

## nginx
sudo apt install nginx

## mariadb
sudo apt install mariadb-server
### mariadb setting
sudo mysql_secure_installation

## php-fpm
sudo apt install php-fpm php-mysql php-xml php-mbstring php-gd php-intl php-ldap php-zip php-imap php-json php-curl
### php check
echo "<?php phpinfo(); ?>" | sudo tee /var/www/html/phpinfo.php

http://localhost


# limesurvey

## download 
cd /var/www/html
sudo wget https://download.limesurvey.org/latest-master/limesurvey6.2.9+230925.zip
# https://community.limesurvey.org/downloads/ 에서 <Download> 링크를 복사해서 붙여주세요.
sudo unzip limesurvey6.2.9+230925.zip

## directory/file ownership
sudo chown -R www-data:www-data /var/www/html/limesurvey/
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

limesurvey download --> https://community.limesurvey.org/downloads/

 

Downloads

Test LimeSurvey Cloud Get the most out of LimeSurvey and start using the LimeSurvey Cloud today We take care of the infrastructure and you concentrate on the important things: your surveys. Our highly available premium hosting provides you with LimeSurvey

community.limesurvey.org


## database setting for limesurvey
sudo mysql -u root -p
CREATE DATABASE limesurvey;
CREATE USER 'limesurvey'@'localhost' IDENTIFIED BY 'your_password';
GRANT ALL PRIVILEGES ON limesurvey.* TO 'limesurvey'@'localhost';
FLUSH PRIVILEGES;
EXIT;

/etc/nginx/sites-available/default 파일에 적용해주세요:

sudo nano /etc/nginx/sites-available/default

server {
    listen 80 default_server;
    listen [::]:80 default_server;

    root /var/www/html;
    index index.php index.html index.htm index.nginx-debian.html;

    server_name _;

    location / {
        try_files $uri $uri/ =404;
    }

    location ~ \.php$ {
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param PATH_INFO $fastcgi_path_info;
    }

    location ~ /\.ht {
        deny all;
    }

    # LimeSurvey specific location
    location /limesurvey {
        try_files $uri $uri/ /limesurvey/index.php?$query_string;
    }
}

sudo nginx -t
sudo systemctl restart nginx

http://localhost/limesurvey/admin


# update setting nginx server
sudo systemctl restart nginx
 

출처: https://modernity.tistory.com/entry/Limesurvey-Self-Hosting-Procedure-1-Installation [FOSSER_Ricoop:티스토리]

'Ubuntu > Ubuntu22.04' 카테고리의 다른 글

[lxc + rstudio server] 설정 및 접속  (0) 2024.08.18
[LXC] 리눅스 컨테이너 설치  (0) 2024.08.18
raid 5 + bcache  (0) 2024.08.01
mail server 설정[1] - 요약  (1) 2023.10.28
Limesurvey Self-Hosting Installation [1]: apache2, php  (0) 2023.09.28