From afd770b659076ad2436a903bc9b2003427f3dd50 Mon Sep 17 00:00:00 2001 From: Disassembler Date: Thu, 29 Jun 2017 21:12:51 +0200 Subject: [PATCH] Add first steps for SeedDMS installation --- seeddms.sh | 23 +++++++++++++++++++++++ seeddms/etc/nginx/apps-available/seeddms | 10 ++++++++++ 2 files changed, 33 insertions(+) create mode 100644 seeddms.sh create mode 100644 seeddms/etc/nginx/apps-available/seeddms diff --git a/seeddms.sh b/seeddms.sh new file mode 100644 index 0000000..e010fc0 --- /dev/null +++ b/seeddms.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +SOURCE_DIR=$(realpath $(dirname "${0}")) + +# Install dependencies for SeedDMS +apt-get --no-install-recommends install php7.0-gd php7.0-fpm php7.0-mbstring php7.0-xml + +# Install SeedDMS +wget https://sourceforge.net/projects/seeddms/files/seeddms-5.0.11/seeddms-5.0.11.tar.gz/download -O /srv/seeddms-5.0.11.tar.gz +tar xf /srv/seeddms-5.0.11.tar.gz -C /srv/ +mv /srv/seeddms-5.0.11 /srv/seeddms + +# Create nginx app definition +cp ${SOURCE_DIR}/seeddms/etc/nginx/apps-available/seeddms /etc/nginx/apps-available/seeddms +ln -s /etc/nginx/apps-available/seeddms /etc/nginx/apps-enabled/seeddms + +# Restart services +systemctl restart nginx + +# TODO: Custom user +# TODO: Set cgroups +# TODO: Dependencies (both PHP and PEAR) +# TODO: Does it run on PostgeSQL or MariaDB only? diff --git a/seeddms/etc/nginx/apps-available/seeddms b/seeddms/etc/nginx/apps-available/seeddms new file mode 100644 index 0000000..9228872 --- /dev/null +++ b/seeddms/etc/nginx/apps-available/seeddms @@ -0,0 +1,10 @@ +location /seeddms { + root /srv; + index index.php; + + location ~ \.php$ { + include snippets/fastcgi-php.conf; + fastcgi_param HTTP_PROXY ""; + fastcgi_pass unix:/run/php/php7.0-fpm.sock; + } +}