UNPKG

2.91 kBapplication/x-shView Raw
1#!/bin/bash
2
3# 25 November 2019
4
5# YottaDB
6
7ydbver="r128"
8ydbversion="r1.28"
9platform="_x86_64"
10
11echo "Installing YottaDB $ydbversion"
12
13# Create a temporary directory for the installer
14mkdir -p /tmp/tmp
15cd /tmp/tmp
16wget https://gitlab.com/YottaDB/DB/YDB/raw/master/sr_unix/ydbinstall.sh
17chmod +x ydbinstall.sh
18
19gtmroot=/usr/lib/yottadb
20gtmcurrent=$gtmroot/current
21
22#echo "mapping libncurses.so.5"
23#ln -s /lib/x86_64-linux-gnu/libncurses.so.5 /lib/x86_64-linux-gnu/libncurses.so.6
24#ln -s /lib/x86_64-linux-gnu/libtinfo.so.5.9 /lib/x86_64-linux-gnu/libtinfo.so.6
25#echo "mapping done"
26
27# make sure directory exists for links to current YottaDB
28mkdir -p $gtmcurrent
29./ydbinstall.sh --utf8 default --verbose --debug --linkenv $gtmcurrent --linkexec $gtmcurrent --force-install $ydbversion
30echo "Configuring YottaDB $ydbversion"
31
32ls -l /usr/lib/yottadb/current
33
34gtmprof=$gtmcurrent/gtmprofile
35gtmprofcmd="source $gtmprof"
36$gtmprofcmd
37tmpfile=`mktemp`
38
39echo 'copying ' $gtmprofcmd ' to profile...'
40echo $gtmprofcmd >> ~/.profile
41
42rm $tmpfile
43unset tmpfile gtmprofcmd gtmprof gtmcurrent gtmroot
44
45cd /opt/qewd
46mkdir sessiondb
47
48echo 'Setting up local internal, unjournalled region for QEWD Session global'
49/usr/local/lib/yottadb/$ydbver/mumps -run ^GDE < /opt/qewd/gde.txt
50/usr/local/lib/yottadb/$ydbver/mupip create -region=qewdreg
51/usr/local/lib/yottadb/$ydbver/mupip set -file -nojournal /opt/qewd/sessiondb/qewd.dat
52
53# Install and configure mgsql routines and QEWD's interface to them
54
55svn export https://github.com/chrisemunt/mgsql/trunk/yottadb /opt/qewd/mgsql
56cp /opt/qewd/mgsql/* /root/.yottadb/$ydbversion$platform/r
57/usr/local/lib/yottadb/$ydbver/mumps -run ylink^%mgsql
58rm -r /opt/qewd/mgsql
59
60cp /opt/qewd/node_modules/qewd-mg-dbx/ci/qewd.ci /usr/local/lib/yottadb/$ydbver
61cp /opt/qewd/node_modules/qewd-mg-dbx/ci/qewdInterface.m /root/.yottadb/$ydbversion$platform/r
62
63echo 'mgsql has been installed'
64echo ' '
65echo 'YottaDB has been installed and configured, ready for use'
66
67cd /opt/qewd
68
69# NodeM
70
71echo 'Installing NodeM'
72
73npm install nodem
74
75ln -sf $gtm_dist/libgtmshr.so /usr/local/lib/
76ldconfig
77#base=~/qewd
78base=/opt/qewd
79[ -f "$GTMCI" ] || export GTMCI="$(find $base -iname nodem.ci)"
80export ydb_ci="$(find $base -iname nodem.ci)"
81nodemgtmr="$(find $base -iname v4wnode.m | tail -n1 | xargs dirname)"
82echo "$gtmroutines" | fgrep "$nodemgtmr" || export gtmroutines="$nodemgtmr $gtmroutines"
83
84#echo 'base=~/qewd' >> ~/.profile
85echo 'base=/opt/qewd' >> ~/.profile
86echo '[ -f "$GTMCI" ] || export GTMCI="$(find $base -iname nodem.ci)"' >> ~/.profile
87echo 'export ydb_ci="$(find $base -iname nodem.ci)"' >> ~/.profile
88echo 'nodemgtmr="$(find $base -iname v4wnode.m | tail -n1 | xargs dirname)"' >> ~/.profile
89echo 'echo "$gtmroutines" | fgrep "$nodemgtmr" || export gtmroutines="$nodemgtmr $gtmroutines"' >> ~/.profile