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