Install SeedDMS using quickstart

This commit is contained in:
Disassembler 2017-09-10 22:32:54 +02:00
parent 0ac3b1660d
commit 4642a0dd55
3 changed files with 13 additions and 23 deletions

View File

@ -6,33 +6,23 @@ SOURCE_DIR=$(realpath $(dirname "${0}"))
apt-get -y --no-install-recommends install php7.0-gd php7.0-fpm php7.0-mbstring php7.0-pgsql php7.0-xml php-log php-mail php-pear
# Install SeedDMS
git clone https://git.code.sf.net/p/seeddms/code /srv/seeddms
git -C /srv/seeddms checkout seeddms-5.1.x
rm -rf /srv/seeddms/.git
wget https://sourceforge.net/projects/seeddms/files/seeddms-5.1.3/seeddms-quickstart-5.1.3.tar.gz/download -O /srv/seeddms.tgz
tar xzf /srv/seeddms.tgz -C /srv
mv /srv/seeddms51x /srv/seeddms
rm -f /srv/seeddms.tgz
# Populate database
export SEEDDMS_PWD=$(head -c 260 /dev/urandom | tr -cd '[:alnum:]' | head -c 26)
envsubst <${SOURCE_DIR}/seeddms/tmp/createdb-seeddms.sql >/tmp/createdb-seeddms.sql
sudo -u postgres psql -f /tmp/createdb-seeddms.sql
rm -f /tmp/createdb-seeddms.sql
envsubst <${SOURCE_DIR}/seeddms/tmp/seeddms-createdb.sql >/tmp/seeddms-createdb.sql
sudo -u postgres psql -f /tmp/seeddms-createdb.sql
rm -f /tmp/seeddms-createdb.sql
export PGPASSWORD=${SEEDDMS_PWD}
psql -f /srv/seeddms/install/create_tables-postgres.sql seeddms seeddms
psql -f /srv/seeddms/www/install/create_tables-postgres.sql seeddms seeddms
unset PGPASSWORD
# Configure SeedDMS
envsubst <${SOURCE_DIR}/seeddms/srv/seeddms/conf/settings.xml >/srv/seeddms/conf/settings.xml
# Adjust directory structure
mkdir -p /srv/seeddms/data/{lucene,staging,cache}
mkdir /srv/seeddms/SeedDMS
mv /srv/seeddms/SeedDMS_Core/Core* /srv/seeddms/SeedDMS/
mv /srv/seeddms/SeedDMS_Lucene/Lucene* /srv/seeddms/SeedDMS/
mv /srv/seeddms/SeedDMS_Preview/Preview* /srv/seeddms/SeedDMS/
mv /srv/seeddms/SeedDMS_SQLiteFTS/SQLiteFTS* /srv/seeddms/SeedDMS/
rm -rf /srv/seeddms/SeedDMS_*
rm -rf /srv/seeddms/install/
rm -rf /srv/seeddms/ext/example/
rm -rf /srv/seeddms/www/install/
chown -R www-data:www-data /srv/seeddms/

View File

@ -1,10 +1,10 @@
location /seeddms {
root /srv;
alias /srv/seeddms/www;
index index.php;
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_param HTTP_PROXY "";
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}
}

View File

@ -6,7 +6,7 @@
<calendar enableCalendar="true" calendarDefaultView="y" firstDayOfWeek="0" />
</site>
<system>
<server rootDir="/srv/seeddms/" httpRoot="/seeddms/" contentDir="/srv/seeddms/data/" stagingDir="/srv/seeddms/data/staging/" luceneDir="/srv/seeddms/data/lucene/" logFileEnable="true" logFileRotation="d" enableLargeFileUpload="true" partitionSize="2000000" dropFolderDir="" cacheDir="/srv/seeddms/data/cache/" maxUploadSize="" />
<server rootDir="/srv/seeddms/www/" httpRoot="/seeddms/" contentDir="/srv/seeddms/data/" stagingDir="/srv/seeddms/data/staging/" luceneDir="/srv/seeddms/data/lucene/" logFileEnable="true" logFileRotation="d" enableLargeFileUpload="true" partitionSize="2000000" dropFolderDir="" cacheDir="/srv/seeddms/data/cache/" maxUploadSize="" />
<authentication enableGuestLogin="false" enablePasswordForgotten="false" restricted="true" enableUserImage="false" disableSelfEdit="false" passwordStrength="0" passwordExpiration="0" passwordHistory="0" passwordStrengthAlgorithm="simple" loginFailure="0" encryptionKey="" enableGuestAutoLogin="false" autoLoginUser="0" quota="0" undelUserIds="" cookieLifetime="0" defaultAccessDocs="0">
<connectors>
<connector enable="false" type="ldap" host="ldaps://ldap.host.com" port="389" baseDN="" bindDN="" bindPw="" filter="" />
@ -21,7 +21,7 @@
<authentication guestID="2" adminIP="" />
<edition enableAdminRevApp="false" versioningFileName="versioning_info.txt" workflowMode="advanced" enableVersionDeletion="true" enableVersionModification="true" enableDuplicateDocNames="true" enableOwnerRevApp="false" enableSelfRevApp="false" enableUpdateRevApp="false" presetExpirationDate="" overrideMimeType="false" removeFromDropFolder="false" />
<notification enableNotificationAppRev="true" enableOwnerNotification="false" enableNotificationWorkflow="false" />
<server coreDir="/srv/seeddms/SeedDMS/" luceneClassDir="/srv/seeddms/SeedDMS/" contentOffsetDir="1048576" maxDirID="0" updateNotifyTime="86400" extraPath="" cmdTimeout="5" maxExecutionTime="30" />
<server coreDir="" luceneClassDir="" contentOffsetDir="1048576" maxDirID="0" updateNotifyTime="86400" extraPath="/srv/seeddms/pear" cmdTimeout="5" maxExecutionTime="30" />
<converters target="fulltext">
<converter mimeType="application/pdf">pdftotext -enc UTF-8 -nopgbrk %s - | sed -e 's/ [a-zA-Z0-9.]\{1\} / /g' -e 's/[0-9.]//g'</converter>
<converter mimeType="application/msword">catdoc %s</converter>