-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathINSTALL.MacOS
186 lines (138 loc) · 6.37 KB
/
INSTALL.MacOS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
Running the SigmaKEE docker image on macOS
==========================================
With Homebrew:
brew install --cask docker <- will install the latest Docker Desktop for macOS
then:
open -a Docker <- to get the Docker daemon running
docker pull apease/sigmakee <- will pull the latest image
docker run -it -d -p 8080:8080 --name trial04 apease/sigmakee:latest <- the name can be anything you like
point a browser to:
http://localhost:8080/sigma/login.html
admin/admin
when finished:
docker stop trial04
===================
macOS install notes
===================
- you need curl or wget to download files, you can install both with
Homebrew.
- java will be installed in /usr/libexec/java_home
- get git from the xcode tools with "xcode-select --install”
- instead of ~/.bash_profile edit ~/.zshrc
- install Homebrew from http://brew.sh and the packages:
brew install make
brew install cmake
brew install gcc
brew install git
brew install graphviz
brew install ant
Add the following lines in your ~/.zshrc and make sure to have all
these variables created before the next step, and replace
/Users/user with your home directory:
# For SIGMA
export SIGMA_HOME=/Users/user/.sigmakee
export ONTOLOGYPORTAL_GIT=/Users/user/workspace
export SIGMA_SRC=$ONTOLOGYPORTAL_GIT/sigmakee
export CATALINA_OPTS="$CATALINA_OPTS -Xmx10g -Xss1m"
export CATALINA_HOME=/Users/user/Programs/apache-tomcat-9.0.97
export PATH=$CATALINA_HOME/bin:$PATH
export SIGMA_CP=$SIGMA_SRC/build/sigmakee.jar:$SIGMA_SRC/lib/*
Next, execute step-by-step the commands below (tested on MacOS 10.14.5 to Sonoma 14.5):
You will need at least Java 21+ (avoid JDK 17) to compile SigmaKEE and to run
Apache Tomcat.
! For ARM processors download it from here: https://jdk.java.net/archive/
Scroll down to 23 GA (build 23+37)
# Check your JDK path, open a terminal and run:
/usr/libexec/java_home --verbose
# Find your JDK (arm64 or x64) path and copy it (choose the one with the /JavaVirtualMachines/ instead of /Internet Plug-Ins/)
export JAVA_HOME= 'path from before', then make sure "bin" is on our PATH
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-23.jdk/Contents/Home
export PATH=$JAVA_HOME/bin:$PATH
Install (ensure the above preparations have been performed)
> ant install
*** Legacy install steps now taken care of by the above command "ant install"
cd ~
mkdir workspace
mkdir .sigmakee
mkdir Programs
cd Programs
curl -O 'https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.97/bin/apache-tomcat-9.0.97.zip'
unzip apache-tomcat-9.0.97.zip
rm apache-tomcat-9.0.97.zip
chmod 777 apache-tomcat-9.0.97/bin/*
cd ../workspace
git clone https://github.com/ontologyportal/sigmakee
git clone https://github.com/ontologyportal/sumo
git clone https://github.com/ontologyportal/TPTP-ANTLR
git clone https://github.com/ontologyportal/SigmaUtils
cd ../Programs
curl -O 'https://wordnetcode.princeton.edu/3.0/WordNet-3.0.tar.gz'
tar xvfz WordNet-3.0.tar.gz
If while you are trying to decompress the WordNet-3.0 file, you are getting the message "Unsupported format" then try to download WordNet-3.0 again by using the next command:
- wget 'https://wordnetcode.princeton.edu/3.0/WordNet-3.0.tar.gz'
and try to uncompress again:
- tar xvfz WordNet-3.0.tar.gz
cp -iav WordNet-3.0/dict/* ~/workspace/sumo/WordNetMappings/
rm WordNet-3.0.tar.gz
curl -O 'https://wwwlehre.dhbw-stuttgart.de/~sschulz/WORK/E_DOWNLOAD/V_2.0/E.tgz'
tar xvzf E.tgz
rm E.tgz
cd E
./configure
make
make install (this step is optional, it will copy E files to /usr/local making it available for the whole system)
cd ..
mkdir ~/.sigmakee/KBs/
cp -R ~/workspace/sumo/* ~/.sigmakee/KBs/
mkdir ~/.sigmakee/KBs/WordNetMappings
cp WordNet-3.0/dict/* ~/.sigmakee/KBs/WordNetMappings/
May have to precede the last command with "sudo"
cp ~/workspace/sigmakee/config.xml ~/.sigmakee/KBs
(SOS) edit the config.xml changing all `wrong paths` to the value of `$HOME` and adapting all variables)
For Homebrew installations of GraphViz, change the path in config.xml for
graphVizDir to: /usr/local/bin
cd ~/workspace/sigmakee
source ~/.zshrc or ~/.bash_profile
ant
*** End legacy install steps
If you want to support multiple users, follow the steps in section "Account Management" from the
README.txt below to set up accounts. Please note however this is not working as of Apr, 2020.
To test run
java -Xmx10g -Xss1m -cp $SIGMA_CP \
com.articulate.sigma.KB -c Object Transaction
If you want to monitor the servers condition and if it started successfully you can run:
tail -f $CATALINA_HOME/logs/catalina.out
To start Tomcat execute:
$CATALINA_HOME/bin/startup.sh or,
simply: startup.sh since $CATALINA_HOME/bin was export to your PATH
Point your browser at http://localhost:8080/sigma/login.html
Default credentials are: admin/admin
You may have some error on login or on a term search initially, that's because server may need ~3 min to initialize everything.
Debugging
- If login.html redirects you to init.jsp that means the system is
still initializing. Wait a minute or two and try again.
- If you are on mac and getting errors related to not finding jars
when running com.articulate.sigma.KB, copy all jars from
~/workspace/sigmakee/build/lib/ to /Library/Java/Extensions
Vampire theorem prover - follow instructions in the main README
To build/run/debug/test using the NetBeans IDE, define a
nbproject/private/private.properties file with these keys:
# private properties
javaapis.dir=${user.home}/javaapis
workspace=${javaapis.dir}/INSAFE
# The default installation space is: ~/workspace. However, it can be
# anywhere on your system as long as you define the "workspace" key above.
catalina.home=${path.to.your.tomcat9}
private.resources.dir=nbproject/private/resources
main.config=${private.resources.dir}/config.xml
integration.config=${private.resources.dir}/config_topAndMid.xml
unit.config=${private.resources.dir}/config_topOnly.xml
# The above properties allow you to keep and restore the various forms of
# config.xml that get overwritten when running Unit Tests. Copy these files
# to the respective "resources" directory complete with your personal system
# paths replacing the "/home/theuser/" pseudos. config.xml is found in the
# base directory and the other two are found in test/*/resources directories
# JavaMail properties
user=${your.email.user.name}
my.email=${user}@${your.email.domain}
my.name=${your.name}